javax.rad.genui.control
Class UITree

java.lang.Object
  extended by javax.rad.genui.UIResource<C>
      extended by javax.rad.genui.UIComponent<ITree>
          extended by javax.rad.genui.control.UITree
All Implemented Interfaces:
IControl, ITranslatable, ITreeControl, ICellFormatable, ITree, IComponent, IResource, INamedObject

public class UITree
extends UIComponent<ITree>
implements ITree

Platform and technology independent Tree. It is designed for use with AWT, Swing, SWT, JSP, JSF, ... .


Field Summary
 
Fields inherited from class javax.rad.genui.UIComponent
lLastTranslationModified, parent
 
Fields inherited from class javax.rad.genui.UIResource
uiResource
 
Constructor Summary
  UITree()
          Creates a new instance of UITree.
protected UITree(ITree pTree)
          Creates a new instance of UITree with the given tree.
 
Method Summary
 void cancelEditing()
          Informs the GUI control, that the last edit should be canceled(restored) the correct value is in the DataBook.
 ICellFormatter getCellFormatter()
          Gets the cell formatter.
 IDataBook[] getDataBooks()
          Returns the DataBooks displayed by this control.
 INodeFormatter getNodeFormatter()
          Gets the node formatter.
 boolean isDetectEndNode()
          Gets if a node should be detected to be an end node or not.
 boolean isEditable()
          Gets if editable or not.
 void notifyRepaint()
          The control need to check if the part is visible and then repaint the part.
 void saveEditing()
          Informs the GUI control, that the last edit should be set into the IDataBook or IDataRow.
 void setCellFormatter(ICellFormatter pCellFormatter)
          Sets the cell formatter.
 void setCellFormatter(Object pCellFormatter, String pMethodName)
          Sets the cell formatter.
 void setDataBooks(IDataBook... pDataBooks)
          Sets the DataBooks displayed by this control.
 void setDetectEndNode(boolean pDetectEndNode)
          Sets if a node should be detected to be an end node or not.
 void setEditable(boolean pEditable)
          Sets if editable or not.
 void setNodeFormatter(INodeFormatter pNodeFormatter)
          Sets the node formatter.
 void setNodeFormatter(Object pNodeFormatter, String pMethodName)
          Sets the node formatter.
 void startEditing()
          Informs the GUI control, that the editor should be opened.
 void updateTranslation()
          Notification for updating the translation.
 
Methods inherited from class javax.rad.genui.UIComponent
addNotify, beforeAddNotify, capture, createCellFormatter, createNodeFormatter, debug, error, eventComponentMoved, eventComponentResized, eventKeyPressed, eventKeyReleased, eventKeyTyped, eventMouseClicked, eventMouseEntered, eventMouseExited, eventMousePressed, eventMouseReleased, getBackground, getBounds, getComponentUIResource, getCurrentTranslation, getCursor, getEventSource, getFactory, getFont, getForeground, getLocation, getLocationRelativeTo, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, getResource, getSize, getToolTipText, getTranslation, info, invokeAndWait, invokeAndWait, invokeInThread, invokeInThread, invokeLater, invokeLater, isBackgroundSet, isBeforeNotified, isCursorSet, isEnabled, isFocusable, isFontSet, isForegroundSet, isMaximumSizeSet, isMinimumSizeSet, isNotified, isPreferredSizeSet, isTranslationChanged, isTranslationEnabled, isVisible, removeNotify, requestFocus, setBackground, setBounds, setBounds, setCursor, setEnabled, setEventSource, setFocusable, setFont, setForeground, setLocation, setLocation, setLocationRelativeTo, setMaximumSize, setMaximumSize, setMinimumSize, setMinimumSize, setName, setParent, setPreferredSize, setPreferredSize, setSize, setSize, setToolTipText, setTranslation, setTranslationEnabled, setVisible, translate
 
Methods inherited from class javax.rad.genui.UIResource
equals, getUIResource, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.rad.ui.IComponent
capture, eventComponentMoved, eventComponentResized, eventKeyPressed, eventKeyReleased, eventKeyTyped, eventMouseClicked, eventMouseEntered, eventMouseExited, eventMousePressed, eventMouseReleased, getBackground, getBounds, getCursor, getEventSource, getFactory, getFont, getForeground, getLocation, getLocationRelativeTo, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, getSize, getToolTipText, isBackgroundSet, isCursorSet, isEnabled, isFocusable, isFontSet, isForegroundSet, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isVisible, requestFocus, setBackground, setBounds, setCursor, setEnabled, setEventSource, setFocusable, setFont, setForeground, setLocation, setLocationRelativeTo, setMaximumSize, setMinimumSize, setName, setParent, setPreferredSize, setSize, setToolTipText, setVisible
 
Methods inherited from interface javax.rad.ui.IResource
getResource
 
Methods inherited from interface javax.rad.model.ui.ITranslatable
getTranslation, setTranslation
 

Constructor Detail

UITree

public UITree()
Creates a new instance of UITree.

See Also:
ITree

UITree

protected UITree(ITree pTree)
Creates a new instance of UITree with the given tree.

Parameters:
pTree - the tree
See Also:
ITree
Method Detail

getDataBooks

public IDataBook[] getDataBooks()
Returns the DataBooks displayed by this control.

Specified by:
getDataBooks in interface ITreeControl
Returns:
the DataBooks.
See Also:
ITreeControl.setDataBooks(javax.rad.model.IDataBook...)

setDataBooks

public void setDataBooks(IDataBook... pDataBooks)
Sets the DataBooks displayed by this control.

Specified by:
setDataBooks in interface ITreeControl
Parameters:
pDataBooks - the DataBooks
See Also:
ITreeControl.getDataBooks()

isDetectEndNode

public boolean isDetectEndNode()
Gets if a node should be detected to be an end node or not. Depending on the used model, the detection can cause additional client server communication.

Specified by:
isDetectEndNode in interface ITree
Returns:
true, if end node detection is enabled.

setDetectEndNode

public void setDetectEndNode(boolean pDetectEndNode)
Sets if a node should be detected to be an end node or not. Depending on the used model, the detection can cause additional client server communication.

Specified by:
setDetectEndNode in interface ITree
Parameters:
pDetectEndNode - true, if end node detection is enabled.

isEditable

public boolean isEditable()
Gets if editable or not.

Specified by:
isEditable in interface ITree
Returns:
if editable or not.

setEditable

public void setEditable(boolean pEditable)
Sets if editable or not.

Specified by:
setEditable in interface ITree
Parameters:
pEditable - if editable or not.

notifyRepaint

public void notifyRepaint()
The control need to check if the part is visible and then repaint the part.

Specified by:
notifyRepaint in interface IControl

startEditing

public void startEditing()
Informs the GUI control, that the editor should be opened.

Specified by:
startEditing in interface ITreeControl

saveEditing

public void saveEditing()
                 throws ModelException
Informs the GUI control, that the last edit should be set into the IDataBook or IDataRow.

Specified by:
saveEditing in interface IControl
Throws:
ModelException - if the value can not be stored.

cancelEditing

public void cancelEditing()
Informs the GUI control, that the last edit should be canceled(restored) the correct value is in the DataBook.

Specified by:
cancelEditing in interface IControl

getCellFormatter

public ICellFormatter getCellFormatter()
Gets the cell formatter.

Specified by:
getCellFormatter in interface ICellFormatable
Returns:
the cell formatter.

setCellFormatter

public void setCellFormatter(ICellFormatter pCellFormatter)
Sets the cell formatter.

Specified by:
setCellFormatter in interface ICellFormatable
Parameters:
pCellFormatter - the cell formatter.

setCellFormatter

public void setCellFormatter(Object pCellFormatter,
                             String pMethodName)
Sets the cell formatter.

Parameters:
pCellFormatter - the cell formatter.
pMethodName - the method name.

getNodeFormatter

public INodeFormatter getNodeFormatter()
Gets the node formatter.

Specified by:
getNodeFormatter in interface ITree
Returns:
the node formatter.

setNodeFormatter

public void setNodeFormatter(INodeFormatter pNodeFormatter)
Sets the node formatter.

Specified by:
setNodeFormatter in interface ITree
Parameters:
pNodeFormatter - the node formatter.

setNodeFormatter

public void setNodeFormatter(Object pNodeFormatter,
                             String pMethodName)
Sets the node formatter.

Parameters:
pNodeFormatter - the node formatter.
pMethodName - the method name.

updateTranslation

public void updateTranslation()
Notification for updating the translation. This method will be called when the UIComponent will be added to a displayable containment hierarchy, when its containment hierarchy is made displayable or the translation table will be changed.

Overrides:
updateTranslation in class UIComponent<ITree>
See Also:
UIComponent.setTranslation(TranslationMap), UIComponent.addNotify()


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.