public class TopicTreePanel extends javax.swing.JPanel implements TopicSelector, TopicMapListener, RefreshListener
javax.swing.JPanel.AccessibleJPaneljavax.swing.JComponent.AccessibleJComponent| Modifier and Type | Field and Description |
|---|---|
javax.swing.JPanel |
buttonPanel |
private TopicTreeRelation[] |
initialAllRelations |
private java.util.Set<java.lang.String> |
initialSelectedRelations |
private javax.swing.JLabel |
jLabel1 |
private javax.swing.JPanel |
jPanel1 |
private javax.swing.JTree |
jTree |
private java.lang.String |
name |
private javax.swing.JButton |
newInstanceButton |
private javax.swing.JButton |
newRootButton |
private javax.swing.JPanel |
newRootPanel |
private javax.swing.JButton |
newSubclassButton |
private java.lang.String |
rootTopic |
private javax.swing.JScrollPane |
scrollPane |
private boolean |
treeEnabled |
private Wandora |
wandora |
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW| Constructor and Description |
|---|
TopicTreePanel(java.lang.String rootTopic,
Wandora parent)
Creates new form TopicTreePanel
|
TopicTreePanel(java.lang.String rootTopic,
Wandora parent,
java.util.Set<java.lang.String> selectedAssociations,
TopicTreeRelation[] associations) |
TopicTreePanel(java.lang.String rootTopic,
Wandora wandora,
java.util.Set<java.lang.String> selectedRelations,
TopicTreeRelation[] allRelations,
java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
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 |
cleanup() |
void |
doRefresh() |
java.awt.Component |
getPanel()
Returns the panel used to make selection.
|
java.lang.String |
getRootSI() |
Topic |
getSelectedTopic()
Returns the selected topic.
|
Topic[] |
getSelectedTopics()
Returns an array of selected topics.
|
Topic |
getSelection() |
java.lang.String |
getSelectorName()
Gets the name of the selector.
|
TopicTree |
getTopicTree() |
void |
init() |
private void |
initComponents()
This method is called from within the constructor to
initialize the form.
|
private void |
jTreeTreeExpanded(javax.swing.event.TreeExpansionEvent evt) |
boolean |
needsRefresh() |
private void |
newInstanceButtonActionPerformed(java.awt.event.ActionEvent evt) |
private void |
newRootButtonActionPerformed(java.awt.event.ActionEvent evt) |
private void |
newSubclassButtonActionPerformed(java.awt.event.ActionEvent evt) |
void |
refresh() |
void |
setModel(java.lang.String rootSI,
java.util.Set<java.lang.String> selectedRelations,
TopicTreeRelation[] allRelations) |
void |
setTreeEnabled(boolean b) |
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.
|
void |
updateSelectedAssociation(java.lang.String oldRelation,
java.lang.String newRelation) |
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, getName, 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 rootTopic
private Wandora wandora
private java.lang.String name
private java.util.Set<java.lang.String> initialSelectedRelations
private TopicTreeRelation[] initialAllRelations
private boolean treeEnabled
public javax.swing.JPanel buttonPanel
private javax.swing.JLabel jLabel1
private javax.swing.JPanel jPanel1
private javax.swing.JTree jTree
private javax.swing.JButton newInstanceButton
private javax.swing.JButton newRootButton
private javax.swing.JPanel newRootPanel
private javax.swing.JButton newSubclassButton
private javax.swing.JScrollPane scrollPane
public TopicTreePanel(java.lang.String rootTopic,
Wandora parent)
throws TopicMapException
TopicMapExceptionpublic TopicTreePanel(java.lang.String rootTopic,
Wandora parent,
java.util.Set<java.lang.String> selectedAssociations,
TopicTreeRelation[] associations)
throws TopicMapException
TopicMapExceptionpublic TopicTreePanel(java.lang.String rootTopic,
Wandora wandora,
java.util.Set<java.lang.String> selectedRelations,
TopicTreeRelation[] allRelations,
java.lang.String name)
throws TopicMapException
rootTopic - Subject identifier of the topic that is used as root for the treeselectedRelations - Names of the associations in associations array that
are used in this topic tree chooser.allRelations - A list of tree association types. Not all of them are
necessarily used in this topic tree chooser. selectedAssociations
contains the names of the used association types.TopicMapExceptionpublic void setModel(java.lang.String rootSI,
java.util.Set<java.lang.String> selectedRelations,
TopicTreeRelation[] allRelations)
throws TopicMapException
rootSI - Subject identifier of the topic that is used as root for the treeselectedRelations - Names of the associations in associations array that
are used in this topic tree chooser.allRelations - A list of tree association types. Not all of them are
necessarily used in this topic tree chooser. selectedAssociations
contains the names of the used association types.TopicMapExceptionpublic java.lang.String getSelectorName()
TopicSelectorgetSelectorName in interface TopicSelectorpublic void setTreeEnabled(boolean b)
public java.lang.String getRootSI()
public void updateSelectedAssociation(java.lang.String oldRelation,
java.lang.String newRelation)
private void initComponents()
private void newRootButtonActionPerformed(java.awt.event.ActionEvent evt)
private void newSubclassButtonActionPerformed(java.awt.event.ActionEvent evt)
private void newInstanceButtonActionPerformed(java.awt.event.ActionEvent evt)
private void jTreeTreeExpanded(javax.swing.event.TreeExpansionEvent evt)
public Topic getSelection()
public boolean needsRefresh()
public void refresh()
throws TopicMapException
TopicMapExceptionpublic Topic[] getSelectedTopics()
TopicSelectorgetSelectedTopics in interface TopicSelectorpublic Topic getSelectedTopic()
TopicSelectorgetSelectedTopic in interface TopicSelectorpublic void init()
init in interface TopicSelectorpublic void cleanup()
cleanup in interface TopicSelectorpublic java.awt.Component getPanel()
TopicSelectorgetPanel in interface TopicSelectorpublic void topicSubjectIdentifierChanged(Topic t, Locator added, Locator removed) throws TopicMapException
TopicMapListenertopicSubjectIdentifierChanged in interface TopicMapListenerTopicMapExceptionpublic void topicBaseNameChanged(Topic t, java.lang.String newName, java.lang.String oldName) throws TopicMapException
TopicMapListenertopicBaseNameChanged in interface TopicMapListenerTopicMapExceptionpublic void topicTypeChanged(Topic t, Topic added, Topic removed) throws TopicMapException
TopicMapListenertopicTypeChanged 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 topicDataChanged(Topic t, Topic type, Topic version, java.lang.String newValue, java.lang.String oldValue) throws TopicMapException
TopicMapListenertopicDataChanged in interface TopicMapListenerTopicMapExceptionpublic void topicSubjectLocatorChanged(Topic t, Locator newLocator, Locator oldLocator) throws TopicMapException
TopicMapListenertopicSubjectLocatorChanged in interface TopicMapListenerTopicMapExceptionpublic void topicRemoved(Topic t) throws TopicMapException
TopicMapListenertopicRemoved in interface TopicMapListenerTopicMapExceptionpublic void topicChanged(Topic t) throws TopicMapException
TopicMapListenertopicChanged in interface TopicMapListenerTopicMapExceptionpublic void associationTypeChanged(Association a, Topic newType, Topic oldType) throws TopicMapException
TopicMapListenerassociationTypeChanged in interface TopicMapListenerTopicMapExceptionpublic void associationPlayerChanged(Association a, Topic role, Topic newPlayer, Topic oldPlayer) throws TopicMapException
TopicMapListenerassociationPlayerChanged in interface TopicMapListenerTopicMapExceptionpublic void associationRemoved(Association a) throws TopicMapException
TopicMapListenerassociationRemoved in interface TopicMapListenerTopicMapExceptionpublic void associationChanged(Association a) throws TopicMapException
TopicMapListenerassociationChanged in interface TopicMapListenerTopicMapExceptionpublic void doRefresh()
throws TopicMapException
doRefresh in interface RefreshListenerTopicMapExceptionpublic TopicTree getTopicTree()
Copyright 2004-2015 Wandora Team