|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
projectviewer.ProjectViewer
Main GUI for the project viewer plugin.
Nested Class Summary |
Nested classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary |
Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
ProjectViewer(org.gjt.sp.jedit.View aView)
Create a new ProjectViewer . |
Method Summary | |
static void |
addProjectViewerListener(ProjectViewerListener lstnr,
org.gjt.sp.jedit.View view)
Add a listener for the instance of project viewer of the given view. |
static void |
addProjectViewerListeners(org.gjt.sp.jedit.PluginJAR jar,
org.gjt.sp.jedit.View view)
Adds to the list of listeners for the given view the listeners that have been declared by the given plugin using properties. |
static void |
addToolbarActions(org.gjt.sp.jedit.PluginJAR jar)
Adds to the list of listeners for the given view the listeners that have been declared by the given plugin using properties. |
protected static void |
cleanViewEntry(org.gjt.sp.jedit.View aView)
Removes the "viewer entry" related to the given view. |
static void |
fireGroupActivated(VPTGroup grp,
org.gjt.sp.jedit.View v)
Fires an event for the loading of a group. |
static void |
fireGroupAddedEvent(VPTGroup group)
|
static void |
fireGroupRemovedEvent(VPTGroup group)
|
static void |
fireNodeMovedEvent(VPTNode moved,
VPTGroup oldParent)
|
static void |
fireNodeSelected(ProjectViewer src,
VPTNode node)
|
static void |
fireProjectAdded(java.lang.Object src,
VPTProject p)
Fires a "project added" event. |
static void |
fireProjectLoaded(java.lang.Object src,
VPTProject p,
org.gjt.sp.jedit.View v)
Fires an event for the loading of a project. |
static void |
fireProjectRemoved(java.lang.Object src,
VPTProject p)
Fires a "project removed" event. |
void |
focusOnDefaultComponent()
|
static VPTNode |
getActiveNode(org.gjt.sp.jedit.View aView)
Return the current "active" node (opened project/group) for the view. |
static VPTProject |
getActiveProject(org.gjt.sp.jedit.View aView)
Return the current active project for the view. |
javax.swing.JTree |
getCurrentTree()
Returns the currently active tree. |
java.lang.String |
getFolderTreeState(VPTNode node)
Returns a String representing the state of the folder tree. |
static ProjectViewer |
getProjectViewer(org.gjt.sp.jedit.View view)
|
VPTNode |
getRoot()
Returns the root node of the current tree. |
java.util.List |
getSelectedFilePaths()
Returns a list of Strings containing the file paths of the selected file and folder nodes. |
VPTNode |
getSelectedNode()
Returns the currently selected node in the tree. |
org.gjt.sp.jedit.View |
getView()
Returns the View associated with this instance. |
static ProjectViewer |
getViewer(org.gjt.sp.jedit.View view)
Returns the viewer associated with the given view, or null if none exists. |
void |
handleMessage(org.gjt.sp.jedit.EBMessage msg)
Handles an EditBus message. |
void |
hierarchyChanged(java.awt.event.HierarchyEvent he)
|
static void |
insertNodeInto(VPTNode child,
VPTNode parent)
Inserts a node in the given parent node (in a sorted position according to VPTNode.findIndexForChild(VPTNode) and
notifies folder trees in all instances of ProjectViewer. |
static void |
nodeChanged(VPTNode node)
Notify all project viewer instances of a change in a node. |
static void |
nodeStructureChanged(VPTNode node)
Notify all project viewer instances of a change in a node's structure. |
static void |
nodeStructureChangedFlat(VPTNode node)
Notify all "flat trees" in any project viewer instances of a change in a node's structure. |
static void |
projectRemoved(java.lang.Object src,
VPTProject p)
Notify all "flat trees" in any project viewer instances of a change in a node's structure. |
static void |
registerAction(Action action)
Adds an action to be shown on the toolbar. |
static void |
removeNodeFromParent(VPTNode child)
Removes a node from its parent, and notifies all folder trees in all instances of ProjectViewer. |
static void |
removeProjectViewerListener(ProjectViewerListener lstnr,
org.gjt.sp.jedit.View view)
Remove the listener from the list of listeners for the given view. |
static void |
removeProjectViewerListeners(org.gjt.sp.jedit.PluginJAR jar)
Removes the listeners loaded by the given plugin from the listener list. |
static void |
removeToolbarActions(org.gjt.sp.jedit.PluginJAR jar)
Removes the project listeners of the given plugin from the list, and from any active project in ProjectViewer. |
static void |
setActiveNode(org.gjt.sp.jedit.View aView,
VPTNode n)
Sets the current active node for the view. |
void |
setChangingBuffers(boolean flag)
Method intended for use by classes that manage clicks on the project trees to open buffers in jEdit; by setting this flag to true, the auto-selecting of the new active buffer in jEdit is temporarily disabled, preventing the tree from shifting around when the user is interacting with it. |
void |
setEnabled(boolean flag)
Enables or disables the viewer GUI. |
void |
setFolderTreeState(VPTNode node,
java.lang.String state)
Sets the folder tree state from the given String. |
void |
setProject(VPTProject p)
Deprecated. Use setRootNode(VPTNode)
instead. |
void |
setRootNode(VPTNode n)
Sets the root node of the trees showm by this viewer. |
void |
setStatus(java.lang.String message)
Changes jEdit's status bar message for the current view. |
static void |
unregisterAction(Action action)
Removes an action from the toolbar. |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
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, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ProjectViewer(org.gjt.sp.jedit.View aView)
ProjectViewer
. Only one instance is allowed
per view.
aView
- The jEdit view where the viewer is to be created.
java.lang.UnsupportedOperationException
- If a viewer is already instantiated
for the given view.
`Method Detail |
public static void registerAction(Action action)
public static void unregisterAction(Action action)
public static void removeToolbarActions(org.gjt.sp.jedit.PluginJAR jar)
public static void addToolbarActions(org.gjt.sp.jedit.PluginJAR jar)
public static ProjectViewer getViewer(org.gjt.sp.jedit.View view)
public static void addProjectViewerListener(ProjectViewerListener lstnr, org.gjt.sp.jedit.View view)
Additionally, for listeners that are registered for all views, a ProjectViewerEvent is fired when a different view is selected.
lstnr
- The listener to add.view
- The view that the lstnr is attached to, or null
if the listener wants to be called from all views.public static void removeProjectViewerListener(ProjectViewerListener lstnr, org.gjt.sp.jedit.View view)
add
method, view
can be null
.
public static void fireProjectLoaded(java.lang.Object src, VPTProject p, org.gjt.sp.jedit.View v)
If the view provided is null, only the listeners registered for the null View will receive the event.
src
- The viewer that generated the change, or null.p
- The activated project.v
- The view where the change occured, or null.public static void fireGroupActivated(VPTGroup grp, org.gjt.sp.jedit.View v)
If the view provided is null, only the listeners registered for the null View will receive the event.
grp
- The activated group.v
- The view where the change occured, or null.public static void fireNodeSelected(ProjectViewer src, VPTNode node)
public static void fireProjectAdded(java.lang.Object src, VPTProject p)
public static void fireProjectRemoved(java.lang.Object src, VPTProject p)
public static void removeProjectViewerListeners(org.gjt.sp.jedit.PluginJAR jar)
public static void addProjectViewerListeners(org.gjt.sp.jedit.PluginJAR jar, org.gjt.sp.jedit.View view)
public static void fireNodeMovedEvent(VPTNode moved, VPTGroup oldParent)
public static void fireGroupAddedEvent(VPTGroup group)
public static void fireGroupRemovedEvent(VPTGroup group)
public static void nodeStructureChanged(VPTNode node)
public static void nodeChanged(VPTNode node)
public static void insertNodeInto(VPTNode child, VPTNode parent)
VPTNode.findIndexForChild(VPTNode)
and
notifies folder trees in all instances of ProjectViewer.
public static void nodeStructureChangedFlat(VPTNode node)
public static void removeNodeFromParent(VPTNode child)
public static void projectRemoved(java.lang.Object src, VPTProject p)
public static ProjectViewer getProjectViewer(org.gjt.sp.jedit.View view)
public static void setActiveNode(org.gjt.sp.jedit.View aView, VPTNode n)
java.lang.IllegalArgumentException
- If node is not a project or group.public static VPTNode getActiveNode(org.gjt.sp.jedit.View aView)
public static VPTProject getActiveProject(org.gjt.sp.jedit.View aView)
protected static void cleanViewEntry(org.gjt.sp.jedit.View aView)
public void setStatus(java.lang.String message)
public VPTNode getSelectedNode()
public java.util.List getSelectedFilePaths()
public javax.swing.JTree getCurrentTree()
public org.gjt.sp.jedit.View getView()
public void setRootNode(VPTNode n)
java.lang.IllegalArgumentException
- If node is not a project or group.public void setProject(VPTProject p)
setRootNode(VPTNode)
instead.
public VPTNode getRoot()
public void setEnabled(boolean flag)
public java.lang.String getFolderTreeState(VPTNode node)
setFolderTreeState(VPTNode, String)
public void setFolderTreeState(VPTNode node, java.lang.String state)
getFolderTreeState(VPTNode)
public void setChangingBuffers(boolean flag)
public void handleMessage(org.gjt.sp.jedit.EBMessage msg)
handleMessage
in interface org.gjt.sp.jedit.EBComponent
public void hierarchyChanged(java.awt.event.HierarchyEvent he)
hierarchyChanged
in interface java.awt.event.HierarchyListener
public void focusOnDefaultComponent()
focusOnDefaultComponent
in interface org.gjt.sp.jedit.gui.DefaultFocusComponent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |