public class Tree extends JTree implements Internationalization, Freeable, OpenDialog, SecureElement, HasHelpIdComponent, HasPreferenceComponent, ApplicationPreferencesListener
| Modifier and Type | Class and Description |
|---|---|
protected class |
Tree.MenuListener |
protected class |
Tree.TreeMouseListener |
JTree.AccessibleJTree, JTree.DropLocation, JTree.DynamicUtilTreeNode, JTree.EmptySelectionModel, JTree.TreeModelHandler, JTree.TreeSelectionRedirectorJComponent.AccessibleJComponentContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategyANCHOR_SELECTION_PATH_PROPERTY, CELL_EDITOR_PROPERTY, CELL_RENDERER_PROPERTY, cellEditor, cellRenderer, editable, EDITABLE_PROPERTY, EXPANDS_SELECTED_PATHS_PROPERTY, INVOKES_STOP_CELL_EDITING_PROPERTY, invokesStopCellEditing, LARGE_MODEL_PROPERTY, largeModel, LEAD_SELECTION_PATH_PROPERTY, ROOT_VISIBLE_PROPERTY, rootVisible, ROW_HEIGHT_PROPERTY, rowHeight, SCROLLS_ON_EXPAND_PROPERTY, scrollsOnExpand, SELECTION_MODEL_PROPERTY, selectionModel, selectionRedirector, SHOWS_ROOT_HANDLES_PROPERTY, showsRootHandles, TOGGLE_CLICK_COUNT_PROPERTY, toggleClickCount, TREE_MODEL_PROPERTY, treeModel, treeModelListener, VISIBLE_ROW_COUNT_PROPERTY, visibleRowCountaccessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWBOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTDEBUG_LANGUAGEDESACTIVATE_COMPONENT_BY_PERMISSION_TIPABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description |
|---|
Tree(String treeURI,
TreeBuilder constructor)
Class constructor.
|
Tree(String treeURI,
TreeBuilder constructor,
EntityReferenceLocator locator)
Class constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected Hashtable |
buildQueryFilter(OTreeNode parentNode) |
Hashtable |
createDataNode(OTreeNode parentNode,
EntityReferenceLocator locator)
This function creates the child nodes of parent node.
|
void |
deletedNode(TreePath p,
Hashtable keysValues,
boolean selected)
Notification for deleded node.
|
protected void |
deleteNodes(int[] rows) |
void |
deleteNotOrganizationalNode(OTreeNode oTreeNode)
This function deletes the child data nodes in an organizational node, for
all child nodes.
|
protected void |
finalize() |
void |
fireTreeWillCollapse(TreePath path) |
void |
fireTreeWillExpand(TreePath path) |
void |
fireValueChanged(TreeSelectionEvent e) |
void |
free()
Makes the object to release the resources.
|
String |
getArchiveName() |
boolean |
getFitSpaceToTree() |
String |
getHelpIdString() |
int |
getQueryDelay() |
protected Vector |
getSQLOrderList(OTreeNode node) |
Vector |
getTextsToTranslate()
Returns all the texts in the element suitable for being translated.
|
void |
initPermissions() |
void |
initPreferences(ApplicationPreferences prefs,
String user) |
void |
insertedNode(TreePath path,
Hashtable keysValues,
EntityReferenceLocator locator,
boolean selectedChild)
Insertion notification.
|
void |
installHelpId() |
boolean |
isRestricted() |
void |
loadTrees(Vector trees)
Loads the tree models whose names are passed in vector parameter.
|
void |
preferenceChanged(PreferenceEvent e)
Invoked when a preference change event occurs.
|
protected void |
processKeyEvent(KeyEvent event)
Overrides the parent method to process custom key events.
|
protected void |
queryNode(TreePath treePath,
Hashtable keys,
boolean forceComplete) |
void |
scrollRectToVisible(Rectangle r) |
void |
setComponentLocale(Locale l) |
void |
setCurrentModel(String tree)
Loads (when it is not loaded) and sets the model for tree.
|
void |
setEditable(boolean editable) |
void |
setFitSpaceToTree(boolean adjust) |
void |
setFormManager(ITreeFormManager formManager) |
void |
setParentFrame(Frame parentFrame)
This method is called from Form for each component that implements this
interface.
|
void |
setQueryDelay(int t) |
void |
setReferenceComponent(ReferenceTreeComponent component) |
void |
setResourceBundle(ResourceBundle resources)
Sets the language resource bundle.
|
boolean |
setSelectedPath(Hashtable hKeysIds) |
boolean |
setSelectedPath(Hashtable hKeysIds,
boolean forzarCompleto) |
protected void |
showPopupMenu(MouseEvent event) |
void |
updateChildrenNodes(OTreeNode parent,
EntityReferenceLocator locator) |
void |
updatedNode(TreePath treePath,
Hashtable attributesValues,
Hashtable filter,
EntityReferenceLocator locator)
Method called when a node is updated.
|
protected void |
updatedNodeAux(TreePath treePath,
Hashtable attributesValues,
Hashtable keysValues,
EntityReferenceLocator locator) |
void |
updatePath(TreePath path) |
void |
updateUI() |
addSelectionInterval, addSelectionPath, addSelectionPaths, addSelectionRow, addSelectionRows, addTreeExpansionListener, addTreeSelectionListener, addTreeWillExpandListener, cancelEditing, clearSelection, clearToggledPaths, collapsePath, collapseRow, convertValueToText, createTreeModel, createTreeModelListener, expandPath, expandRow, fireTreeCollapsed, fireTreeExpanded, getAccessibleContext, getAnchorSelectionPath, getCellEditor, getCellRenderer, getClosestPathForLocation, getClosestRowForLocation, getDefaultTreeModel, getDescendantToggledPaths, getDragEnabled, getDropLocation, getDropMode, getEditingPath, getExpandedDescendants, getExpandsSelectedPaths, getInvokesStopCellEditing, getLastSelectedPathComponent, getLeadSelectionPath, getLeadSelectionRow, getMaxSelectionRow, getMinSelectionRow, getModel, getNextMatch, getPathBetweenRows, getPathBounds, getPathForLocation, getPathForRow, getPreferredScrollableViewportSize, getRowBounds, getRowCount, getRowForLocation, getRowForPath, getRowHeight, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getScrollsOnExpand, getSelectionCount, getSelectionModel, getSelectionPath, getSelectionPaths, getSelectionRows, getShowsRootHandles, getToggleClickCount, getToolTipText, getTreeExpansionListeners, getTreeSelectionListeners, getTreeWillExpandListeners, getUI, getUIClassID, getVisibleRowCount, hasBeenExpanded, isCollapsed, isCollapsed, isEditable, isEditing, isExpanded, isExpanded, isFixedRowHeight, isLargeModel, isPathEditable, isPathSelected, isRootVisible, isRowSelected, isSelectionEmpty, isVisible, makeVisible, paramString, removeDescendantSelectedPaths, removeDescendantToggledPaths, removeSelectionInterval, removeSelectionPath, removeSelectionPaths, removeSelectionRow, removeSelectionRows, removeTreeExpansionListener, removeTreeSelectionListener, removeTreeWillExpandListener, scrollPathToVisible, scrollRowToVisible, setAnchorSelectionPath, setCellEditor, setCellRenderer, setDragEnabled, setDropMode, setExpandedState, setExpandsSelectedPaths, setInvokesStopCellEditing, setLargeModel, setLeadSelectionPath, setModel, setRootVisible, setRowHeight, setScrollsOnExpand, setSelectionInterval, setSelectionModel, setSelectionPath, setSelectionPaths, setSelectionRow, setSelectionRows, setShowsRootHandles, setToggleClickCount, setUI, setVisibleRowCount, startEditingAtPath, stopEditing, treeDidChangeaddAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateadd, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleprotected static boolean DEBUG
public static int PREFERRED_WIDTH
public static boolean enabledRowCount
public static final String ADJUST_TREE_SPACE
public static String TITLE_DELETE_NODE_RESULT_ERROR
public static String TITLE_DELETE_NODE_RESULT_SUCCESSFULLY
public static String TITLE_DELETE_NODE_RESULT_ERROR_es_ES
public static String TITLE_DELETE_NODE_RESULT_SUCCESSFULLY_es_ES
public static String M_DELETED_NODE
public static String M_DELETED_NODE_es_ES
public static String M_UPDATED_NODE
public static String M_UPDATED_NODE_es_ES
public static String M_ERROR_DELETED_NODE
public static String M_DELETED_NODE_SUCCESSFULLY
public static String M_DELETED_NODE_SUCCESSFULLY_es_ES
public static String M_ERROR_DELETED_NODE_es_ES
protected static String queryTextKey
protected static String deleteNodeTextKey
protected static String updateTextKey
protected static String ascendingOrderKey
protected static String orderByTextKey
protected static String descendingOrderKey
protected static String editNodeKey
protected static String selectedQueryKey
protected static String fitSpaceToTreeKey
protected com.ontimize.gui.tree.Tree.QueryPopup popup
protected ImageIcon newIcon
protected ResourceBundle resource
protected ReferenceTreeComponent compReference
protected EntityReferenceLocator locator
protected ITreeFormManager formManager
protected Hashtable modelList
protected String currentTree
protected ExtendedJPopupMenu popupMenu
protected JMenuItem updateItem
protected JMenu orderBy
protected JMenuItem queryItem
protected JMenuItem deleteNodeItem
protected JMenuItem ascOrderItem
protected JMenuItem descOrderItem
protected JMenuItem editNodeItem
protected JCheckBoxMenuItem fitSpaceToTreeMenuItem
protected TreeBuilder treeBuilder
protected Tree.TreeMouseListener treeMouseListener
protected Tree.MenuListener menuListener
protected Frame parentFrame
protected boolean fitSpaceToTree
protected int queryDelayTime
protected boolean restricted
public Tree(String treeURI, TreeBuilder constructor)
super(), registers
the tooltip manager, creates the contextual pop-up menu options for right
mouse button and fixes the tree model.treeURI - the path to the file with tree definitionconstructor - reference to the tree constructor that must process tree
definition file and return the tree modelpublic Tree(String treeURI, TreeBuilder constructor, EntityReferenceLocator locator)
treeURI - the path to the file with tree definitionconstructor - reference to the tree constructor that must process tree
definition file and return the tree modellocator - a reference to the locatorpublic void setEditable(boolean editable)
setEditable in class JTreepublic void setCurrentModel(String tree)
tree - the name of modelpublic void loadTrees(Vector trees)
trees - protected void showPopupMenu(MouseEvent event)
public Hashtable createDataNode(OTreeNode parentNode, EntityReferenceLocator locator)
parentNode - the parent node for current nodelocator - a reference to the locatorHashtable with data.public void deleteNotOrganizationalNode(OTreeNode oTreeNode)
oTreeNode - the nodeprotected void processKeyEvent(KeyEvent event)
processKeyEvent in class JComponentevent - the key eventpublic Vector getTextsToTranslate()
InternationalizationgetTextsToTranslate in interface Internationalizationpublic void setResourceBundle(ResourceBundle resources)
InternationalizationsetResourceBundle in interface Internationalizationresources - the new language bundle.public void setComponentLocale(Locale l)
setComponentLocale in interface Internationalizationpublic void fireTreeWillExpand(TreePath path) throws ExpandVetoException
fireTreeWillExpand in class JTreeExpandVetoExceptionpublic void fireTreeWillCollapse(TreePath path) throws ExpandVetoException
fireTreeWillCollapse in class JTreeExpandVetoExceptionpublic void fireValueChanged(TreeSelectionEvent e)
fireValueChanged in class JTreepublic void free()
throws Exception
Freeableprotected void finalize()
throws Throwable
public void updatePath(TreePath path)
public void setParentFrame(Frame parentFrame)
OpenDialogsetParentFrame in interface OpenDialogparentFrame - the framepublic void insertedNode(TreePath path, Hashtable keysValues, EntityReferenceLocator locator, boolean selectedChild)
path - the pathkeysValues - the keysValues of inserted recordlocator - the locatorselectedChild - the condition to allow selection childrenpublic void deletedNode(TreePath p, Hashtable keysValues, boolean selected)
p - the pathkeysValues - the key values that determine the nodeselected - the condition for allowing select a node after deletingpublic void updatedNode(TreePath treePath, Hashtable attributesValues, Hashtable filter, EntityReferenceLocator locator)
treePath - the pathattributesValues - the keys and values before updating node process.filter - keyvalues to obtain the node to updatelocator - the reference to locatorprotected void updatedNodeAux(TreePath treePath, Hashtable attributesValues, Hashtable keysValues, EntityReferenceLocator locator)
public String getArchiveName()
public void initPermissions()
initPermissions in interface SecureElementprotected void deleteNodes(int[] rows)
public void setFormManager(ITreeFormManager formManager)
public void setReferenceComponent(ReferenceTreeComponent component)
public String getHelpIdString()
getHelpIdString in interface HasHelpIdComponentpublic void installHelpId()
installHelpId in interface HasHelpIdComponentpublic boolean getFitSpaceToTree()
public void scrollRectToVisible(Rectangle r)
scrollRectToVisible in class JComponentpublic boolean isRestricted()
isRestricted in interface SecureElementpublic void setFitSpaceToTree(boolean adjust)
public void initPreferences(ApplicationPreferences prefs, String user)
initPreferences in interface HasPreferenceComponentpublic void preferenceChanged(PreferenceEvent e)
ApplicationPreferencesListenerpreferenceChanged in interface ApplicationPreferencesListenerpublic final boolean setSelectedPath(Hashtable hKeysIds)
public final boolean setSelectedPath(Hashtable hKeysIds, boolean forzarCompleto)
public void setQueryDelay(int t)
public int getQueryDelay()
public void updateChildrenNodes(OTreeNode parent, EntityReferenceLocator locator)
Copyright © 2016 Imatia Innovation S.L.. All rights reserved.