public class GraphTopicPanel extends javax.swing.JPanel implements TopicPanel, javax.swing.Scrollable, SimpleComponent, Clipboardable, TopicMapListener, RefreshListener, java.awt.event.ActionListener, java.awt.event.ComponentListener
javax.swing.JPanel.AccessibleJPaneljavax.swing.JComponent.AccessibleJComponent| Modifier and Type | Field and Description |
|---|---|
private boolean |
autoCreateTopicsInPaste |
private TopicMapGraphPanel |
graphPanel |
private Options |
localOptions |
private java.lang.String |
OPTIONS_PREFIX |
private java.lang.String |
OPTIONS_VIEW_PREFIX |
private java.util.HashMap<java.lang.Integer,SimpleToggleButton> |
toolButtons |
protected Wandora |
wandora |
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW| Constructor and Description |
|---|
GraphTopicPanel() |
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent actionEvent) |
boolean |
applyChanges()
Topic panel should store all pending changes immediately.
|
void |
associationChanged(Association a)
A notification used to report general or large changes in association.
|
void |
associationPlayerChanged(Association a,
Topic role,
Topic newPlayer,
Topic oldPlayer)
A notification that a player in an association with a certain role has
been changed.
|
void |
associationRemoved(Association a)
A notification that an association has been completely removed.
|
void |
associationTypeChanged(Association a,
Topic newType,
Topic oldType)
A notification that association type has changed.
|
void |
componentHidden(java.awt.event.ComponentEvent e) |
void |
componentMoved(java.awt.event.ComponentEvent e) |
void |
componentResized(java.awt.event.ComponentEvent e) |
void |
componentShown(java.awt.event.ComponentEvent e) |
void |
copy() |
void |
cut() |
void |
doRefresh() |
void |
focusGained(java.awt.event.FocusEvent e) |
void |
focusLost(java.awt.event.FocusEvent e) |
java.util.Collection |
getContext() |
java.util.Collection<Association> |
getContextAssociations() |
java.util.Collection<Topic> |
getContextTopics() |
TopicMapGraphPanel |
getGraphPanel() |
javax.swing.JPanel |
getGui()
Return the UI element for the topic panel.
|
javax.swing.Icon |
getIcon()
Return icon image of the topic panel.
|
java.lang.String |
getName()
Return name of the topic panel.
|
int |
getOrder()
Return integer number that specifies topic panel's order.
|
java.awt.Dimension |
getPreferredScrollableViewportSize() |
int |
getScrollableBlockIncrement(java.awt.Rectangle visibleRect,
int orientation,
int direction) |
boolean |
getScrollableTracksViewportHeight() |
boolean |
getScrollableTracksViewportWidth() |
int |
getScrollableUnitIncrement(java.awt.Rectangle visibleRect,
int orientation,
int direction) |
java.lang.String |
getTitle()
Return title of the topic panel.
|
Topic |
getTopic()
Return the active topic in topic panel.
|
protected Topic |
getTopicForIdentifier(java.lang.String id) |
LocatorHistory |
getTopicHistory()
A topic panel can store it's own topic history.
|
javax.swing.JMenu |
getViewMenu() |
java.lang.Object[] |
getViewMenuStruct()
Topic panel can provide a menu structure that Wandora views in UI.
|
javax.swing.JPopupMenu |
getViewPopupMenu() |
void |
init()
Initialize the TopicPanel.
|
private void |
makeToolBar(java.awt.Container container) |
void |
mouseToolChanged(int tool) |
boolean |
noScroll()
If this returns true, then the topic panel will not be wrapped inside
a scroll pane.
|
void |
old_paste() |
void |
open(Topic topic)
Open a topic in the topic panel.
|
void |
paste() |
void |
refresh()
Request topic panel UI refresh.
|
void |
stop()
A topic panel should stop all threads and close all (shared) resources.
|
boolean |
supportsOpenTopic()
Does the topic panel support topic open? In other words can one call the
open method with a topic.
|
void |
toggleVisibility(java.lang.String componentName) |
void |
topicBaseNameChanged(Topic t,
java.lang.String newName,
java.lang.String oldName)
Notification that the base name has been changed.
|
void |
topicChanged(Topic t)
A notification used to report general or large changes in topic, for example when topics are merged.
|
void |
topicDataChanged(Topic t,
Topic type,
Topic version,
java.lang.String newValue,
java.lang.String oldValue)
Notification that topic occurrence has been changed.
|
void |
topicRemoved(Topic t)
Notification that a topic has been completely removed.
|
void |
topicSubjectIdentifierChanged(Topic t,
Locator added,
Locator removed)
Notification that a subject identifier has changed.
|
void |
topicSubjectLocatorChanged(Topic t,
Locator newLocator,
Locator oldLocator)
Notification that the subject locator has been changed.
|
void |
topicTypeChanged(Topic t,
Topic added,
Topic removed)
Notification that a topic type has changed.
|
void |
topicVariantChanged(Topic t,
java.util.Collection<Topic> scope,
java.lang.String newName,
java.lang.String oldName)
Notification that a variant name has been changed.
|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIaddAncestorListener, 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, updateadd, 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, validateTreeaction, 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, 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, transferFocusUpCycleprivate java.lang.String OPTIONS_PREFIX
private java.lang.String OPTIONS_VIEW_PREFIX
protected Wandora wandora
private TopicMapGraphPanel graphPanel
private java.util.HashMap<java.lang.Integer,SimpleToggleButton> toolButtons
private Options localOptions
private boolean autoCreateTopicsInPaste
public void init()
TopicPanelinit in interface TopicPanelpublic void mouseToolChanged(int tool)
public TopicMapGraphPanel getGraphPanel()
private void makeToolBar(java.awt.Container container)
public void refresh()
throws TopicMapException
TopicPanelrefresh in interface TopicPanelTopicMapExceptionpublic LocatorHistory getTopicHistory()
TopicPanelgetTopicHistory in interface TopicPanelpublic java.util.Collection<Association> getContextAssociations()
public java.util.Collection<Topic> getContextTopics()
public java.util.Collection getContext()
public Topic getTopic() throws TopicMapException
TopicPanelgetTopic in interface TopicPanelTopicMapExceptionpublic javax.swing.Icon getIcon()
TopicPanelgetIcon in interface TopicPanelpublic java.lang.String getName()
TopicPanelgetName in interface TopicPanelgetName in class java.awt.Componentpublic java.lang.String getTitle()
TopicPanelgetTitle in interface TopicPanelpublic int getOrder()
TopicPanelgetOrder in interface TopicPanelpublic javax.swing.JPanel getGui()
TopicPanelgetGui in interface TopicPanelpublic boolean applyChanges()
throws CancelledException,
TopicMapException
TopicPanelapplyChanges in interface TopicPanelCancelledExceptionTopicMapExceptionpublic boolean noScroll()
TopicPanelnoScroll in interface TopicPanelpublic javax.swing.JPopupMenu getViewPopupMenu()
getViewPopupMenu in interface TopicPanelpublic javax.swing.JMenu getViewMenu()
getViewMenu in interface TopicPanelpublic java.lang.Object[] getViewMenuStruct()
TopicPanelgetViewMenuStruct in interface TopicPanelpublic void stop()
TopicPanelstop in interface TopicPanelpublic boolean supportsOpenTopic()
TopicPanelsupportsOpenTopic in interface TopicPanelpublic void open(Topic topic) throws TopicMapException
TopicPanelopen in interface TopicPanelTopicMapExceptionpublic void toggleVisibility(java.lang.String componentName)
public void actionPerformed(java.awt.event.ActionEvent actionEvent)
actionPerformed in interface java.awt.event.ActionListenerpublic boolean getScrollableTracksViewportWidth()
getScrollableTracksViewportWidth in interface javax.swing.Scrollablepublic boolean getScrollableTracksViewportHeight()
getScrollableTracksViewportHeight in interface javax.swing.Scrollablepublic java.awt.Dimension getPreferredScrollableViewportSize()
getPreferredScrollableViewportSize in interface javax.swing.Scrollablepublic int getScrollableUnitIncrement(java.awt.Rectangle visibleRect,
int orientation,
int direction)
getScrollableUnitIncrement in interface javax.swing.Scrollablepublic int getScrollableBlockIncrement(java.awt.Rectangle visibleRect,
int orientation,
int direction)
getScrollableBlockIncrement in interface javax.swing.Scrollablepublic void focusLost(java.awt.event.FocusEvent e)
focusLost in interface java.awt.event.FocusListenerpublic void focusGained(java.awt.event.FocusEvent e)
focusGained in interface java.awt.event.FocusListenerpublic void topicTypeChanged(Topic t, Topic added, Topic removed) throws TopicMapException
TopicMapListenertopicTypeChanged in interface TopicMapListenerTopicMapExceptionpublic void doRefresh()
throws TopicMapException
doRefresh in interface RefreshListenerTopicMapExceptionpublic void topicSubjectIdentifierChanged(Topic t, Locator added, Locator removed) throws TopicMapException
TopicMapListenertopicSubjectIdentifierChanged in interface TopicMapListenerTopicMapExceptionpublic void topicSubjectLocatorChanged(Topic t, Locator newLocator, Locator oldLocator) throws TopicMapException
TopicMapListenertopicSubjectLocatorChanged in interface TopicMapListenerTopicMapExceptionpublic void associationChanged(Association a) throws TopicMapException
TopicMapListenerassociationChanged in interface TopicMapListenerTopicMapExceptionpublic void associationRemoved(Association a) throws TopicMapException
TopicMapListenerassociationRemoved in interface TopicMapListenerTopicMapExceptionpublic void topicBaseNameChanged(Topic t, java.lang.String newName, java.lang.String oldName) throws TopicMapException
TopicMapListenertopicBaseNameChanged in interface TopicMapListenerTopicMapExceptionpublic void topicDataChanged(Topic t, Topic type, Topic version, java.lang.String newValue, java.lang.String oldValue) throws TopicMapException
TopicMapListenertopicDataChanged in interface TopicMapListenerTopicMapExceptionpublic void topicVariantChanged(Topic t, java.util.Collection<Topic> scope, java.lang.String newName, java.lang.String oldName) throws TopicMapException
TopicMapListenertopicVariantChanged in interface TopicMapListenerTopicMapExceptionpublic void associationPlayerChanged(Association a, Topic role, Topic newPlayer, Topic oldPlayer) throws TopicMapException
TopicMapListenerassociationPlayerChanged in interface TopicMapListenerTopicMapExceptionpublic void associationTypeChanged(Association a, Topic newType, Topic oldType) throws TopicMapException
TopicMapListenerassociationTypeChanged in interface TopicMapListenerTopicMapExceptionpublic void topicChanged(Topic t) throws TopicMapException
TopicMapListenertopicChanged in interface TopicMapListenerTopicMapExceptionpublic void topicRemoved(Topic t) throws TopicMapException
TopicMapListenertopicRemoved in interface TopicMapListenerTopicMapExceptionpublic void copy()
copy in interface Clipboardablepublic void cut()
cut in interface Clipboardablepublic void paste()
paste in interface Clipboardableprotected Topic getTopicForIdentifier(java.lang.String id)
public void old_paste()
public void componentResized(java.awt.event.ComponentEvent e)
componentResized in interface java.awt.event.ComponentListenerpublic void componentMoved(java.awt.event.ComponentEvent e)
componentMoved in interface java.awt.event.ComponentListenerpublic void componentShown(java.awt.event.ComponentEvent e)
componentShown in interface java.awt.event.ComponentListenerpublic void componentHidden(java.awt.event.ComponentEvent e)
componentHidden in interface java.awt.event.ComponentListenerCopyright 2004-2015 Wandora Team