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.AccessibleJPanel
javax.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, updateUI
addAncestorListener, 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, update
add, 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, validateTree
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, 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, transferFocusUpCycle
private 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()
TopicPanel
init
in interface TopicPanel
public void mouseToolChanged(int tool)
public TopicMapGraphPanel getGraphPanel()
private void makeToolBar(java.awt.Container container)
public void refresh() throws TopicMapException
TopicPanel
refresh
in interface TopicPanel
TopicMapException
public LocatorHistory getTopicHistory()
TopicPanel
getTopicHistory
in interface TopicPanel
public java.util.Collection<Association> getContextAssociations()
public java.util.Collection<Topic> getContextTopics()
public java.util.Collection getContext()
public Topic getTopic() throws TopicMapException
TopicPanel
getTopic
in interface TopicPanel
TopicMapException
public javax.swing.Icon getIcon()
TopicPanel
getIcon
in interface TopicPanel
public java.lang.String getName()
TopicPanel
getName
in interface TopicPanel
getName
in class java.awt.Component
public java.lang.String getTitle()
TopicPanel
getTitle
in interface TopicPanel
public int getOrder()
TopicPanel
getOrder
in interface TopicPanel
public javax.swing.JPanel getGui()
TopicPanel
getGui
in interface TopicPanel
public boolean applyChanges() throws CancelledException, TopicMapException
TopicPanel
applyChanges
in interface TopicPanel
CancelledException
TopicMapException
public boolean noScroll()
TopicPanel
noScroll
in interface TopicPanel
public javax.swing.JPopupMenu getViewPopupMenu()
getViewPopupMenu
in interface TopicPanel
public javax.swing.JMenu getViewMenu()
getViewMenu
in interface TopicPanel
public java.lang.Object[] getViewMenuStruct()
TopicPanel
getViewMenuStruct
in interface TopicPanel
public void stop()
TopicPanel
stop
in interface TopicPanel
public boolean supportsOpenTopic()
TopicPanel
supportsOpenTopic
in interface TopicPanel
public void open(Topic topic) throws TopicMapException
TopicPanel
open
in interface TopicPanel
TopicMapException
public void toggleVisibility(java.lang.String componentName)
public void actionPerformed(java.awt.event.ActionEvent actionEvent)
actionPerformed
in interface java.awt.event.ActionListener
public boolean getScrollableTracksViewportWidth()
getScrollableTracksViewportWidth
in interface javax.swing.Scrollable
public boolean getScrollableTracksViewportHeight()
getScrollableTracksViewportHeight
in interface javax.swing.Scrollable
public java.awt.Dimension getPreferredScrollableViewportSize()
getPreferredScrollableViewportSize
in interface javax.swing.Scrollable
public int getScrollableUnitIncrement(java.awt.Rectangle visibleRect, int orientation, int direction)
getScrollableUnitIncrement
in interface javax.swing.Scrollable
public int getScrollableBlockIncrement(java.awt.Rectangle visibleRect, int orientation, int direction)
getScrollableBlockIncrement
in interface javax.swing.Scrollable
public void focusLost(java.awt.event.FocusEvent e)
focusLost
in interface java.awt.event.FocusListener
public void focusGained(java.awt.event.FocusEvent e)
focusGained
in interface java.awt.event.FocusListener
public void topicTypeChanged(Topic t, Topic added, Topic removed) throws TopicMapException
TopicMapListener
topicTypeChanged
in interface TopicMapListener
TopicMapException
public void doRefresh() throws TopicMapException
doRefresh
in interface RefreshListener
TopicMapException
public void topicSubjectIdentifierChanged(Topic t, Locator added, Locator removed) throws TopicMapException
TopicMapListener
topicSubjectIdentifierChanged
in interface TopicMapListener
TopicMapException
public void topicSubjectLocatorChanged(Topic t, Locator newLocator, Locator oldLocator) throws TopicMapException
TopicMapListener
topicSubjectLocatorChanged
in interface TopicMapListener
TopicMapException
public void associationChanged(Association a) throws TopicMapException
TopicMapListener
associationChanged
in interface TopicMapListener
TopicMapException
public void associationRemoved(Association a) throws TopicMapException
TopicMapListener
associationRemoved
in interface TopicMapListener
TopicMapException
public void topicBaseNameChanged(Topic t, java.lang.String newName, java.lang.String oldName) throws TopicMapException
TopicMapListener
topicBaseNameChanged
in interface TopicMapListener
TopicMapException
public void topicDataChanged(Topic t, Topic type, Topic version, java.lang.String newValue, java.lang.String oldValue) throws TopicMapException
TopicMapListener
topicDataChanged
in interface TopicMapListener
TopicMapException
public void topicVariantChanged(Topic t, java.util.Collection<Topic> scope, java.lang.String newName, java.lang.String oldName) throws TopicMapException
TopicMapListener
topicVariantChanged
in interface TopicMapListener
TopicMapException
public void associationPlayerChanged(Association a, Topic role, Topic newPlayer, Topic oldPlayer) throws TopicMapException
TopicMapListener
associationPlayerChanged
in interface TopicMapListener
TopicMapException
public void associationTypeChanged(Association a, Topic newType, Topic oldType) throws TopicMapException
TopicMapListener
associationTypeChanged
in interface TopicMapListener
TopicMapException
public void topicChanged(Topic t) throws TopicMapException
TopicMapListener
topicChanged
in interface TopicMapListener
TopicMapException
public void topicRemoved(Topic t) throws TopicMapException
TopicMapListener
topicRemoved
in interface TopicMapListener
TopicMapException
public void copy()
copy
in interface Clipboardable
public void cut()
cut
in interface Clipboardable
public void paste()
paste
in interface Clipboardable
protected Topic getTopicForIdentifier(java.lang.String id)
public void old_paste()
public void componentResized(java.awt.event.ComponentEvent e)
componentResized
in interface java.awt.event.ComponentListener
public void componentMoved(java.awt.event.ComponentEvent e)
componentMoved
in interface java.awt.event.ComponentListener
public void componentShown(java.awt.event.ComponentEvent e)
componentShown
in interface java.awt.event.ComponentListener
public void componentHidden(java.awt.event.ComponentEvent e)
componentHidden
in interface java.awt.event.ComponentListener
Copyright 2004-2015 Wandora Team