public class FileTreePanel
extends javax.swing.JPanel
implements jadex.commons.IPropertiesProvider
Modifier and Type | Class and Description |
---|---|
static class |
FileTreePanel.DelegationFilter
Delegation filter class.
|
static class |
FileTreePanel.DelegationIconCache
The delegation icon cache.
|
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
protected ExpansionHandler |
expansionhandler
Tree expansion handler remembers open tree nodes.
|
protected jadex.bridge.IExternalAccess |
exta
The external access.
|
protected INodeFactory |
factory
The node factory.
|
protected FileTreePanel.DelegationIconCache |
iconcache
The iconcache.
|
protected boolean |
keeproots
The keep roots flag (if added top-level nodes should be used instead of nodes from loaded properties).
|
protected jadex.commons.gui.IMenuItemConstructor |
mic
The filter popup.
|
protected AsyncSwingTreeModel |
model
The component tree model.
|
protected jadex.commons.gui.PopupBuilder |
pubuilder
Popup rightclick.
|
protected boolean |
remote
The remote flag.
|
protected javax.swing.JTree |
tree
The component tree.
|
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
FileTreePanel(jadex.bridge.IExternalAccess exta)
Create a new component tree panel.
|
FileTreePanel(jadex.bridge.IExternalAccess exta,
boolean remote,
boolean keeproots)
Create a new component tree panel.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addNode(ISwingTreeNode node)
Add a root node to the tree panel.
|
void |
addNodeHandler(ISwingNodeHandler handler)
Add a node handler.
|
void |
addTopLevelNode(java.io.File file)
Add a top level node.
|
void |
addTopLevelNode(jadex.bridge.service.types.filetransfer.FileData file)
Add a top level node.
|
void |
dispose()
Dispose the tree.
|
jadex.bridge.IExternalAccess |
getExternalAccess()
Get the external access.
|
INodeFactory |
getFactory()
Get the node factory.
|
jadex.commons.gui.IMenuItemConstructor |
getMenuItemConstructor()
Get the menu item constructor.
|
AsyncSwingTreeModel |
getModel()
Get the tree model.
|
jadex.commons.gui.PopupBuilder |
getPopupBuilder()
Get the popup builder.
|
jadex.commons.future.IFuture<jadex.commons.Properties> |
getProperties()
Write current state into properties.
|
java.lang.String[] |
getSelectionPaths()
Get selected file paths.
|
javax.swing.JTree |
getTree()
Get the tree.
|
boolean |
isRemote()
Get the remote.
|
static void |
main(java.lang.String[] args)
Main for testing.
|
void |
removeTopLevelNode(ISwingTreeNode node)
Add a top level node.
|
void |
setIconCache(IIconCache iconcache)
Set the iconcache.
|
void |
setMenuItemConstructor(jadex.commons.gui.IMenuItemConstructor mic)
Set the menu item constructor.
|
void |
setNodeFactory(INodeFactory factory)
Set the factory.
|
void |
setPopupBuilder(jadex.commons.gui.PopupBuilder pubuilder)
Set the popup builder.
|
jadex.commons.future.IFuture<java.lang.Void> |
setProperties(jadex.commons.Properties props)
Update tool from given properties.
|
protected void |
showPopUp(int x,
int y)
Show the popup.
|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
addAncestorListener, 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, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, 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, update
add, 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, validateTree
action, 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, 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, transferFocusUpCycle
protected final boolean remote
protected final boolean keeproots
protected final jadex.bridge.IExternalAccess exta
protected final AsyncSwingTreeModel model
protected final javax.swing.JTree tree
protected ExpansionHandler expansionhandler
protected FileTreePanel.DelegationIconCache iconcache
protected INodeFactory factory
protected jadex.commons.gui.PopupBuilder pubuilder
protected jadex.commons.gui.IMenuItemConstructor mic
public FileTreePanel(jadex.bridge.IExternalAccess exta)
public FileTreePanel(jadex.bridge.IExternalAccess exta, boolean remote, boolean keeproots)
public void addNodeHandler(ISwingNodeHandler handler)
public AsyncSwingTreeModel getModel()
public javax.swing.JTree getTree()
public jadex.bridge.IExternalAccess getExternalAccess()
public boolean isRemote()
public void setMenuItemConstructor(jadex.commons.gui.IMenuItemConstructor mic)
mic
- The menu item constructor.public jadex.commons.gui.IMenuItemConstructor getMenuItemConstructor()
public void setPopupBuilder(jadex.commons.gui.PopupBuilder pubuilder)
pubuilder
- The popup builder.public jadex.commons.gui.PopupBuilder getPopupBuilder()
public void setIconCache(IIconCache iconcache)
iconcache
- The iconcache to set.public INodeFactory getFactory()
public void setNodeFactory(INodeFactory factory)
factory
- The factory to set.public void dispose()
protected void showPopUp(int x, int y)
x
- The x position.y
- The y position.public void removeTopLevelNode(ISwingTreeNode node)
public void addTopLevelNode(java.io.File file)
public void addTopLevelNode(jadex.bridge.service.types.filetransfer.FileData file)
protected void addNode(ISwingTreeNode node)
public jadex.commons.future.IFuture<jadex.commons.Properties> getProperties()
getProperties
in interface jadex.commons.IPropertiesProvider
public jadex.commons.future.IFuture<java.lang.Void> setProperties(jadex.commons.Properties props)
setProperties
in interface jadex.commons.IPropertiesProvider
public java.lang.String[] getSelectionPaths()
public static void main(java.lang.String[] args)