|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--javax.swing.JPanel | +--com.borland.primetime.ide.ProjectView
ProjectView displays a tree view of the currently 'active' project along with a toolbar which may be used to modify that project or switch to other open projects. It is created by the Browser and there is one instance per Browser. It adds itself as a ProjectListener and dynamically refreshes as files are added or removed. Certain static methods allow locating all open projects regardless of Browser.
Browser
,
ProjectListener
, Serialized FormInner classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
Inner classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
Field Summary | |
static BrowserAction |
ACTION_ActivateNode
An action which opens those currently selected node(s) having one or more registered NodeViewers in the Content Manager. |
static BrowserAction |
ACTION_ContextMenu
An action which displays the popup menu for the ProjectView. |
static BrowserAction |
ACTION_FileAdd
Displays a FileChooser dialog allowing the user to select a file to open. |
static BrowserAction |
ACTION_NewFolder
Action that creates a new Folder relative to the selected node based on a name supplied through a dialog. |
static BrowserAction |
ACTION_ProjectCloseActive
Closes the active Project, and saves it if it has been modified. |
static BrowserAction |
ACTION_ProjectNodeDelete
Deletes the selected files and removes Node from its Project. |
static BrowserAction |
ACTION_ProjectNodeRemove
Removes the selected Node from its Project. |
static BrowserAction |
ACTION_ProjectNodeRename
Action which renames the active selected node in the ProjectView to a new name. |
static BrowserAction |
ACTION_ProjectRefresh
An action which causes the ProjectView for the currently active project to be rebuilt. |
static java.lang.String |
DEFAULT_PROJECT
|
ActionGroup |
GROUP_OpenProjects
Displays the open projects for the user to select one to activate. |
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 |
Method Summary | |
void |
addFile()
The method called by the action ACTION_FileAdd which displays the dialog and adds the selected files to the project. |
void |
closeProject(Project project)
Closes a Project (and all opened Nodes from the Project) from this ProjectView. |
void |
closeProjects(Project[] projects)
Closes given Projects (and all opened Nodes within each Project) from this ProjectView. |
Project |
getActiveProject()
Returns the 'active' Project of this ProjectView. |
Project |
getActiveUserProject()
Returns the 'active' Project of this ProjectView if it is not the default project. |
java.awt.Dimension |
getMinimumSize()
Overriden to ensure minimum size of 100x100. |
static int |
getModifiedProjectCount()
Returns the count of open *modified* projects. |
static Project |
getOpenProject(int index)
Returns the open project at the specified index. |
static int |
getOpenProjectCount()
Returns the count of open projects. |
static Project[] |
getOpenProjects()
Returns the list of open projects as an array. |
Node |
getSelectedNode()
Returns the currently selected Node in this ProjectView. |
Node |
getSelectedNode(Project project)
Returns the currently selected Node in this ProjectView. |
Node[] |
getSelectedNodes()
Returns the currently selected Nodes in this ProjectView. |
Node[] |
getSelectedNodes(Project project)
Returns the currently selected Nodes in this ProjectView from the specified project. |
boolean |
isVisible()
Returns if ProjectView is visible. |
void |
refreshTree()
This routine is used to force the ProjectView for the active project to be rebuilt. |
void |
refreshTree(Project project)
This routine is used to force the ProjectView for the given open project to be rebuilt. |
static void |
registerContextActionProvider(ContextActionProvider provider)
OpenTools registration for an interface used to provide an Action to appear on the ProjectView popup menu. |
void |
setActiveProject(Project project)
Sets the 'active' Project in this ProjectView. |
void |
setSelectedNode(Node node)
If the given node is part of an opened project, it is made the selected node of that project causing its tree node to be expanded and scrolled into view if not already visible. |
void |
setSelectedNodes(Project project,
Node[] nodes)
All the given nodes must belong to the given project. |
void |
showNode(Node node)
If the given node is part of an opened project, its tree node is expanded and scrolled into view if not already visible. |
void |
updateUI()
Overridden to paint open projects. |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUIClassID, paramString |
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, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String DEFAULT_PROJECT
public static BrowserAction ACTION_ProjectRefresh
public static BrowserAction ACTION_ActivateNode
public static BrowserAction ACTION_FileAdd
public static BrowserAction ACTION_ContextMenu
public static BrowserAction ACTION_ProjectNodeRemove
public static BrowserAction ACTION_ProjectNodeDelete
public static BrowserAction ACTION_ProjectNodeRename
public static BrowserAction ACTION_ProjectCloseActive
public ActionGroup GROUP_OpenProjects
public static BrowserAction ACTION_NewFolder
Method Detail |
public static int getOpenProjectCount()
public static int getModifiedProjectCount()
public static Project getOpenProject(int index)
index
- An index into the array returned by getOpenProjects().public static Project[] getOpenProjects()
public void setActiveProject(Project project) throws java.lang.Exception
Note that if the passed Project is not already the active Project in
this ProjectView, calling this method will trigger several Browser events:
project
- The Project to activate in this ProjectView.java.lang.Exception
- A myriad of different exceptions can be thrown when
setting the active Project, including VetoException (if a
BrowserListener doesn't want the Project, Node, or the viewer to
change, or if a NodeViewer doesn't want the viewer to change).
Any number of IOExceptions or Node exceptions can be thrown if
the Project is being opened for the first time.public Project getActiveProject()
public Project getActiveUserProject()
public void setSelectedNode(Node node)
node
- The Node whose tree node is to be selected.public void showNode(Node node)
node
- The Node whose tree node is to be shown.public void setSelectedNodes(Project project, Node[] nodes)
project
- Project to which the given nodes belong.nodes
- An array identifying the Nodes to be selected.public Node getSelectedNode()
public Node getSelectedNode(Project project)
project
- The project to return the selected node frompublic Node[] getSelectedNodes()
public Node[] getSelectedNodes(Project project)
project
- The project to retrieve the selected nodes frompublic void refreshTree()
public void refreshTree(Project project)
project
- The open project whose ProjectView is to be rebuilt.public void closeProject(Project project) throws java.lang.Exception
project
- The Project to closejava.lang.Exception
- A myriad of different exceptions can be thrown when
closing a Project, including VetoException (if a BrowserListener
doesn't want the Project, Node, or the viewer to change, or if a
NodeViewer doesn't want the viewer to change). Any number of
IOExceptions or Node exceptions can be thrown during the Node
save/close process.public void closeProjects(Project[] projects) throws java.lang.Exception
projects
- An array of open Projects to closejava.lang.Exception
- A myriad of different exceptions can be thrown when
closing a Project, including VetoException (if a BrowserListener
doesn't want the Project, Node, or the viewer to change, or if a
NodeViewer doesn't want the viewer to change). Any number of
IOExceptions or Node exceptions can be thrown during the Node
save/close process.public void addFile()
public static void registerContextActionProvider(ContextActionProvider provider)
provider
- An interface which can provide the popup menu Action.public boolean isVisible()
isVisible
in class java.awt.Component
public java.awt.Dimension getMinimumSize()
getMinimumSize
in class javax.swing.JComponent
public void updateUI()
updateUI
in class javax.swing.JPanel
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |