|
||||||||||
| PREV CLASS Documentation homepage 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
ilog.views.appframe.swing.IlvPanelView
ilog.views.appframe.swing.IlvTreeView
ilog.views.appframe.swing.IlvExplorerView
public class IlvExplorerView
Explorer view for visualizing and editing data container documents.
IlvDataContainerDocument,
Serialized Form| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JPanel |
|---|
JPanel.AccessibleJPanel |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
static String |
DEFAULT_SETTINGS_NAME
Default attribute name for selecting the settings element that provides the settings of the explorer view. |
static String |
DEFAULT_SETTINGS_TYPE
Type of settings element providing the settings for the tree views. |
static String |
INSERT_FILE_CMD
Action command key for the action that inserts a new file. |
static String |
INSERT_FOLDER_CMD
Action command key for the action that inserts a new folder. |
static String |
INSERT_PROJECT_CMD
Action command key for the action that inserts a new project. |
static String |
OPEN_PROJECT_NODE_CMD
Action command key for the action that opens the selected data container nodes. |
static String |
REMOVE_NODE_CMD
Action command key for the action that removes a node from the data container visualized by the explorer view. |
| 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 ilog.views.appframe.docview.IlvDocumentView |
|---|
ACTIVE_PROPERTY, ACTIVE_VIEW_NAME, APPLICATION_PROPERTY, CLOSABLE_PROPERTY, CLOSING_VIEW_MSG, DOCUMENT_PROPERTY, SETTINGS_ELEMENT_PROPERTY, STATIC_VIEW_PROPERTY, VIEW_CONTAINER_PROPERTY |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
|
IlvExplorerView()
Constructs a new IlvExplorerView. |
protected |
IlvExplorerView(String settingsType,
String defaultSettingsName)
Constructs an explorer view that reads its settings from a settings element with the specified settingsType. |
| Method Summary | |
|---|---|
void |
actionPerformed(ActionEvent e)
Invoked when an action occurs. |
protected boolean |
canOpenNodes(Object[] nodes)
Determines whether the selected nodes of the data container
associated with this explorer view can be opened. |
protected boolean |
canRemoveDataContainerNode(Object parent,
Object node)
Determines whether the specified data container node can be
removed. |
protected boolean |
canRemoveNodes(Object[] nodes)
Determines whether the specified data container nodes can
be removed from their data container. |
protected boolean |
canRemoveTreeNode(TreeNode treeNode)
Determines whether the specified treeNode can be removed
from this explorer view. |
protected TreeCellRenderer |
createTreeCellRenderer(JTree tree)
Creates a tree cell renderer for the explorer view. |
IlvDataContainer |
getDataContainer()
Returns the data container associated with this explorer view. |
protected Object |
getDataContainerNode(Object treeNode)
Returns the data container node associated with the specified treeNode or null. |
protected String |
getNewFolderName(Object parent)
Gets a name for a new folder to be created. |
protected Icon |
getNodeIcon(Object node,
boolean expanded)
Returns an icon for the tree node associated with the specified data container node. |
protected String |
getNodeText(Object node)
Gets the text for the tree node associated with the specified data container node. |
protected void |
initializeTree(JTree tree)
Invoked by the initializeView(ilog.views.appframe.docview.IlvDocument) method after the
IlvTreeView.createTree() method has been called, for initializing the
newly created tree. |
protected void |
initializeView(IlvDataContainer dataContainer)
Initializes the explorer view with the specified data container. |
void |
initializeView(IlvDocument document)
Initializes the tree view with the specified document. |
protected Object[] |
insertNewFiles(Object parent)
Inserts a new file reference into the specified data container parent
node. |
protected Object |
insertNewFolder(Object parent)
Inserts a new folder into the specified data container parent
node. |
protected Object[] |
insertNewProject(Object parent)
Inserts a new project reference into the specified data container parent
node. |
boolean |
isProcessingAction(String command)
Determines whether the explorer view is able to perform the action with the specified command key in its
actionPerformed(java.awt.event.ActionEvent) method. |
protected void |
nodeDoubleClicked(MouseEvent e,
TreeNode treeNode,
Object userData)
Invoked when a tree node has been double-clicked in the explorer view. |
protected void |
nodeRightClicked(MouseEvent e,
TreeNode treeNode,
Object node)
Invoked when a tree node has been right-clicked in the explorer view. |
protected boolean |
openNodes(Object[] nodes)
Opens the selected nodes of
the data container associated with this explorer view. |
protected void |
readSettings(IlvSettingsElement settingsElement)
Reads the settings of the tree view. |
protected boolean |
removeNodes(Object[] nodes)
Removes the selected data container nodes from
the data container associated with this explorer view. |
boolean |
updateAction(Action action)
Invoked by the application for updating the state of the specified action. |
protected void |
writeSettings(IlvSettingsElement settingsElement)
Writes the settings of the tree view. |
| Methods inherited from class ilog.views.appframe.swing.IlvTreeView |
|---|
addTree, createTree, getProperty, getTree, setProperty, setTree, viewClosed, viewClosing |
| Methods inherited from class ilog.views.appframe.swing.IlvPanelView |
|---|
addActionHandler, close, getApplication, getDocument, getSettings, getSettingsElement, getSettingsName, getSettingsQuery, getSettingsType, getViewContainer, isStaticView, receiveMessage, registerMappings, removeActionHandler, setApplication, setDocument, setSettings, setSettingsElement, setSettingsName, setSettingsQuery, setViewContainer |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface ilog.views.appframe.util.IlvPropertyManager |
|---|
addPropertyChangeListener, removePropertyChangeListener |
| Field Detail |
|---|
public static final String DEFAULT_SETTINGS_TYPE
public static final String DEFAULT_SETTINGS_NAME
public static final String INSERT_FOLDER_CMD
public static final String INSERT_FILE_CMD
public static final String INSERT_PROJECT_CMD
public static final String REMOVE_NODE_CMD
public static final String OPEN_PROJECT_NODE_CMD
| Constructor Detail |
|---|
protected IlvExplorerView(String settingsType,
String defaultSettingsName)
settingsType.
settingsType - The type of the settings element providing the settings
for the tree view.defaultSettingsName - The default name used to select the settings
element that provides the settings for this tree view.IlvPanelView.getSettingsType(),
IlvPanelView.getSettingsName()public IlvExplorerView()
IlvExplorerView.
| Method Detail |
|---|
public void initializeView(IlvDocument document)
DOCUMENT_PROPERTY of the view.
initializeView in interface IlvDocumentViewinitializeView in class IlvTreeViewdocument - The document to initialize the content of the tree view from.protected void initializeView(IlvDataContainer dataContainer)
dataContainer - The data container to initialize the explorer view from.protected void initializeTree(JTree tree)
initializeView(ilog.views.appframe.docview.IlvDocument) method after the
IlvTreeView.createTree() method has been called, for initializing the
newly created tree. A new selection listener is added
to the specified tree.
initializeTree in class IlvTreeViewtree - The tree to initialize.public IlvDataContainer getDataContainer()
IlvDataContainerProvider
interface.
null if the document
of the view does not implement the
IlvDataContainerProvider interface.IlvDataContainerProvider,
IlvDataContainerDocument
protected Icon getNodeIcon(Object node,
boolean expanded)
node.
node - The data container node to associate an icon with.expanded - The expanded state to get the icon for.
If true, the icon for the expanded state is required;
if false, the icon for the collapsed state is required.
null.protected String getNodeText(Object node)
node.
protected TreeCellRenderer createTreeCellRenderer(JTree tree)
createTreeCellRenderer in class IlvTreeViewIlvTreeView.createTree()protected void readSettings(IlvSettingsElement settingsElement)
readSettings in class IlvPanelViewsettingsElement - The root settings element that contains the
settings for this tree view.protected void writeSettings(IlvSettingsElement settingsElement)
writeSettings in class IlvPanelViewsettingsElement - The root settings element to write the settings to.
protected void nodeDoubleClicked(MouseEvent e,
TreeNode treeNode,
Object userData)
userData.
nodeDoubleClicked in class IlvTreeViewe - The mouse event that originated the call to this method.treeNode - The tree node.userData - The user data associated with this node or
null.IlvTreeView.initializeTree(javax.swing.JTree)
protected void nodeRightClicked(MouseEvent e,
TreeNode treeNode,
Object node)
node.
nodeRightClicked in class IlvTreeViewe - The mouse event that originated the call to this method. Parameters
of this event can be used for displaying a pop-up menu.treeNode - The tree node.node - The node of the associated data container that corresponds to
the specified treeNode.IlvDataContainer.getCategory(java.lang.Object)public boolean isProcessingAction(String command)
command key in its
actionPerformed(java.awt.event.ActionEvent) method.
isProcessingAction in interface ActionHandlerisProcessingAction in class IlvPanelViewcommand - The command key of the action.
true if the tree view performs the specified
action; false otherwise.public boolean updateAction(Action action)
action.
updateAction in interface ActionHandlerupdateAction in class IlvPanelViewaction - The action to update.
true if the listener has updated the state of the
action; false otherwise.public void actionPerformed(ActionEvent e)
actionPerformed in interface ActionListeneractionPerformed in class IlvPanelViewe - The action event.protected Object insertNewFolder(Object parent)
parent
node. This method is invoked when processing the action with the
command key INSER