org.ceryle.ui.graph
Class TopicEditorDialog
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
javax.swing.JDialog
org.ceryle.ui.graph.TopicEditorDialog
- All Implemented Interfaces:
- ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants
public class TopicEditorDialog
- extends JDialog
Extends JDialog providing editor features for Topic nodes (TNodes). This uses
a series of tabbed panes for each of the editor subpanels:
- Summary Tab
- a quick summary of the other tabs
- Description Tab
- lists the Topic ID, labels and description
- Facet Tab
- provides an editor for facets of this Topic
- Occurrence Tab
- lists occurrences of this Topic
- Instance Tab
- Lists the instances of this Topic (as a class)
- Since:
- JDK1.4
- Version:
- $Id: TopicEditorDialog.java,v 3.25 2007-06-20 01:28:21 altheim Exp $
- Author:
- Murray Altheim
- See Also:
- Serialized Form
|
Field Summary |
protected int |
BORDER
The border size around each tabbed panel. |
static int |
CONNECTED_ROW_COUNT
The default number of rows to show in the connected nodes display list. |
static int |
DESCRIPTION_ROW_COUNT
The default number of rows to show in the description text field. |
static int |
DESCRIPTION_TAB
TopicEditorDialog.DESCRIPTION_TAB indicates the description tab. |
protected boolean |
dirty
A boolean indicating an editing change to the Topic has occurred,
but not yet been saved to the TopicMap. |
static int |
FACET_TAB
TopicEditorDialog.FACET_TAB indicates the facets tab. |
static int |
INSTANCE_TAB
TopicEditorDialog.INST_TAB indicates the instances tab. |
protected Topic |
m_topic
The Topic object this TopicEditorDialog references. |
static int |
OCCURRENCE_TAB
TopicEditorDialog.OCCUR_TAB indicates the occurrences tab. |
static int |
SUMMARY_TAB
TopicEditorDialog.SUMMARY_TAB indicates the summary tab. |
protected TMPanelEditor |
tmpedit
The TMPanelEditor used to make editing changes to the underlying
TopicMap document. |
protected TopicMapProcessor |
tmproc
|
|
Constructor Summary |
TopicEditorDialog(TMLayoutPanel tmpanel)
Constructor for a dialog box displaying information about a Topic,
supplied with the TMLayoutPanel used. |
|
Method Summary |
void |
addInstance()
Add an instance of the current Topic. |
void |
addOccurrence()
Add an occurrence to the current Topic. |
boolean |
closeTopic()
Closes reference to the current topic. |
void |
editTopic(TMLayoutPanel tmpanel,
TNode tnode)
Sets the editing facilities for the provided TNode and its underlying Topic. |
TMPanelEditor |
getEditor()
Returns the TMPanelEditor used to make changes to the
Topic Map and its visualization. |
protected TMLayoutPanel |
getSource()
Returns the TMLayoutPanel visualizing the source topic map. |
boolean |
isDirty()
Returns true if any changes have been made to the Topic's characteristics. |
boolean |
isInTransition()
Returns true if the TopicEditorDialog is in transition between loading topics. |
void |
openInstance(Topic topic)
Loads the provided Topic into the editor. |
void |
openOccurrence(Occurrence occur)
If there is a Topic Map loaded, passes the Object off
to its openOccurrence(Object) method, otherwise
this message is ignored. |
void |
removeInstance(Topic topic)
Remove the instance indicated by the selection. |
void |
removeOccurrence(Object content)
Remove the occurrence indicated by the selection. |
void |
saveProperties()
Save any UI properties to the preferences file. |
protected void |
selectTab(int tab)
Selects the tab indicated by the int tab, using one of
the enumerated constants. |
protected void |
setDirty(boolean state)
Sets the dirty state for this dialog. |
protected void |
setSource(TMLayoutPanel tmpanel)
Sets the TMLayoutPanel used to visualize the source topic map. |
boolean |
setTopicLabel(String label)
Sets the Topic label and updates the display. |
void |
setVisible(boolean visible)
Sets the TMLayoutPanel used to visualize the source topic map. |
void |
viewTopic(Topic topic)
View the TNode associated with the Topic topic. |
| Methods inherited from class javax.swing.JDialog |
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update |
| Methods inherited from class java.awt.Dialog |
addNotify, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setResizable, setTitle, setUndecorated, show |
| Methods inherited from class java.awt.Window |
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, finalize, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, isActive, isAlwaysOnTop, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setAlwaysOnTop, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationByPlatform, setLocationRelativeTo, toBack, toFront |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, show, size, toString, transferFocus, transferFocusUpCycle |
SUMMARY_TAB
public static final int SUMMARY_TAB
- TopicEditorDialog.SUMMARY_TAB indicates the summary tab.
- See Also:
- Constant Field Values
DESCRIPTION_TAB
public static final int DESCRIPTION_TAB
- TopicEditorDialog.DESCRIPTION_TAB indicates the description tab.
- See Also:
- Constant Field Values
FACET_TAB
public static final int FACET_TAB
- TopicEditorDialog.FACET_TAB indicates the facets tab.
- See Also:
- Constant Field Values
OCCURRENCE_TAB
public static final int OCCURRENCE_TAB
- TopicEditorDialog.OCCUR_TAB indicates the occurrences tab.
- See Also:
- Constant Field Values
INSTANCE_TAB
public static final int INSTANCE_TAB
- TopicEditorDialog.INST_TAB indicates the instances tab.
- See Also:
- Constant Field Values
BORDER
protected int BORDER
- The border size around each tabbed panel.
DESCRIPTION_ROW_COUNT
public static int DESCRIPTION_ROW_COUNT
- The default number of rows to show in the description text field.
CONNECTED_ROW_COUNT
public static int CONNECTED_ROW_COUNT
- The default number of rows to show in the connected nodes display list.
m_topic
protected Topic m_topic
- The Topic object this TopicEditorDialog references.
dirty
protected boolean dirty
- A boolean indicating an editing change to the Topic has occurred,
but not yet been saved to the TopicMap.
tmpedit
protected TMPanelEditor tmpedit
- The TMPanelEditor used to make editing changes to the underlying
TopicMap document. This is lazily-created.
tmproc
protected TopicMapProcessor tmproc
TopicEditorDialog
public TopicEditorDialog(TMLayoutPanel tmpanel)
- Constructor for a dialog box displaying information about a Topic,
supplied with the TMLayoutPanel used.
setVisible
public void setVisible(boolean visible)
- Sets the TMLayoutPanel used to visualize the source topic map.
- Overrides:
setVisible in class Component
setSource
protected void setSource(TMLayoutPanel tmpanel)
- Sets the TMLayoutPanel used to visualize the source topic map.
getSource
protected TMLayoutPanel getSource()
- Returns the TMLayoutPanel visualizing the source topic map.
getEditor
public TMPanelEditor getEditor()
- Returns the TMPanelEditor used to make changes to the
Topic Map and its visualization.
saveProperties
public void saveProperties()
- Save any UI properties to the preferences file.
editTopic
public void editTopic(TMLayoutPanel tmpanel,
TNode tnode)
- Sets the editing facilities for the provided TNode and its underlying Topic.
This is the corollary for
viewTopic(Topic) except this provides a TNode.
viewTopic
public void viewTopic(Topic topic)
- View the TNode associated with the Topic topic.
closeTopic
public boolean closeTopic()
- Closes reference to the current topic. If there have been any
changes, queries the user to save. Returns true if the topic
was not dirty, it was saved, or the user opted not to save.
setDirty
protected void setDirty(boolean state)
- Sets the dirty state for this dialog.
isDirty
public boolean isDirty()
- Returns true if any changes have been made to the Topic's characteristics.
setTopicLabel
public boolean setTopicLabel(String label)
- Sets the Topic label and updates the display.
Returns true if successful.
isInTransition
public boolean isInTransition()
- Returns true if the TopicEditorDialog is in transition between loading topics.
addOccurrence
public void addOccurrence()
- Add an occurrence to the current Topic.
openOccurrence
public void openOccurrence(Occurrence occur)
- If there is a Topic Map loaded, passes the Object off
to its openOccurrence(Object) method, otherwise
this message is ignored.
removeOccurrence
public void removeOccurrence(Object content)
- Remove the occurrence indicated by the selection.
addInstance
public void addInstance()
- Add an instance of the current Topic.
openInstance
public void openInstance(Topic topic)
- Loads the provided Topic into the editor.
removeInstance
public void removeInstance(Topic topic)
- Remove the instance indicated by the selection.
selectTab
protected void selectTab(int tab)
- Selects the tab indicated by the int tab, using one of
the enumerated constants.
- See Also:
SUMMARY_TAB,
DESCRIPTION_TAB,
FACET_TAB,
OCCURRENCE_TAB,
INSTANCE_TAB
The Ceryle Project. Copyright ©2001-2007 Murray Altheim, All Rights Reserved. See LICENSE included with distribution.