public class TopicMapGraphPanel extends javax.swing.JPanel implements java.lang.Runnable, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.ComponentListener, java.awt.event.MouseWheelListener, TopicMapListener, RefreshListener, java.awt.event.KeyListener
Modifier and Type | Class and Description |
---|---|
private static class |
TopicMapGraphPanel.Cluster |
private class |
TopicMapGraphPanel.PopupListener |
private class |
TopicMapGraphPanel.TopicPanelTransferHandler |
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
private boolean |
animation |
private boolean |
cropNodeBoxes |
private java.awt.image.BufferedImage |
doubleBuffer |
private javax.swing.JDialog |
filterDialog |
private FilterManagerPanel |
filterManagerPanel |
private VNode |
followNode |
private double |
fps |
private double |
framerate |
private boolean |
freeze |
private boolean |
freezeForMouseOver |
private boolean |
freezeForPopup |
private GraphFilter |
graphFilter |
private java.awt.Font |
infoFont |
private java.awt.FontMetrics |
infoFontMetrics |
private boolean |
labelEdges |
private boolean |
makeLocalSettingsGlobal |
private double |
maxX |
private double |
maxY |
private double |
minX |
private double |
minY |
private VModel |
model |
private VEdge |
mouseOverEdge |
private VNode |
mouseOverNode |
private int |
mouseTool |
private MouseToolManager |
mouseToolManager |
private double |
mouseX |
private double |
mouseY |
private boolean |
needsRefresh |
private Options |
options |
private java.lang.String |
OPTIONS_PREFIX |
private java.lang.String |
OPTIONS_VIEW_PREFIX |
private Projection |
projection |
private java.util.HashMap |
renderingHints |
private Topic |
rootTopic |
private boolean |
running |
private java.util.ArrayList<Tuples.T2<java.lang.Double,java.lang.Double>> |
selectPath |
private java.lang.Thread |
thread |
private TopicMapModel |
tmModel |
static int |
TOOL_ASSOCIATION |
static int |
TOOL_ERASER |
static int |
TOOL_OPEN |
static int |
TOOL_SELECT |
private boolean |
viewFilterInfo |
private boolean |
viewInfo |
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 |
---|
TopicMapGraphPanel(Wandora w,
Options opts)
Creates new form TopicMapGraphPanel
|
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 |
clearModel() |
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) |
private java.util.ArrayList<TopicMapGraphPanel.Cluster> |
doClustering() |
void |
doRefresh() |
boolean |
getAnimationEnabled() |
boolean |
getAntialized() |
boolean |
getCropNodeBoxes() |
javax.swing.JPopupMenu |
getEdgeMenu() |
double |
getFramerate() |
boolean |
getFreezeForMouseOver() |
javax.swing.JPopupMenu |
getGeneralMenu() |
GraphFilter |
getGraphFilter() |
boolean |
getLabelEdges() |
VModel |
getModel() |
Association |
getMouseOverAssociation() |
VEdge |
getMouseOverEdge() |
VNode |
getMouseOverNode() |
Topic |
getMouseOverTopic() |
int |
getMouseTool() |
Tuples.T2<java.lang.Double,java.lang.Double> |
getMouseWorldCoordinates() |
private Association |
getNewAssociationFor(Association a,
TopicMap tm) |
private Topic |
getNewTopicFor(Topic t,
TopicMap tm) |
javax.swing.JPopupMenu |
getNodeMenu() |
java.lang.Object[] |
getOptionsMenuStruct() |
Projection |
getProjection() |
java.util.HashMap |
getRenderingHints() |
VNode |
getRootNode() |
Topic |
getRootTopic() |
java.util.Set<VEdge> |
getSelectedEdges() |
java.util.Set<VNode> |
getSelectedNodes() |
java.util.Collection<Topic> |
getSelectedTopics() |
static java.lang.String |
getToolDescription(int toolType) |
static java.lang.String |
getToolName(int toolType) |
TopicMapModel |
getTopicMapModel() |
Tuples.T2<java.lang.Double,java.lang.Double> |
getViewCoordinates() |
boolean |
getViewFilterInfo() |
Wandora |
getWandora() |
private void |
initComponents()
This method is called from within the constructor to
initialize the form.
|
void |
keyPressed(java.awt.event.KeyEvent e) |
void |
keyReleased(java.awt.event.KeyEvent e) |
void |
keyTyped(java.awt.event.KeyEvent e) |
boolean |
lockMouseTool(MouseTool tool) |
void |
mouseClicked(java.awt.event.MouseEvent e) |
void |
mouseDragged(java.awt.event.MouseEvent e) |
void |
mouseEntered(java.awt.event.MouseEvent e) |
void |
mouseExited(java.awt.event.MouseEvent e) |
void |
mouseMoved(java.awt.event.MouseEvent e) |
void |
mousePressed(java.awt.event.MouseEvent e) |
void |
mouseReleased(java.awt.event.MouseEvent e) |
void |
mouseWheelMoved(java.awt.event.MouseWheelEvent e) |
void |
openFilterManager() |
void |
paint(java.awt.Graphics g) |
void |
refreshGraph() |
void |
releaseMouseTool() |
void |
remakeModels(TopicMap tm) |
void |
run() |
void |
selectNodesWithPath(java.util.ArrayList<Tuples.T2<java.lang.Double,java.lang.Double>> path) |
void |
setAnimationEnabled(boolean b) |
void |
setAntialized(boolean b) |
void |
setCropNodeBoxes(boolean b) |
void |
setFilterManagerPanel(FilterManagerPanel filterManagerPanel) |
void |
setFramerate(double fr) |
void |
setFreezeForMouseOver(boolean b) |
void |
setFreezeForPopup(boolean b) |
void |
setLabelEdges(boolean b) |
void |
setMouseFollowNode(VNode node) |
void |
setMouseTool(int tool) |
private void |
setOption(java.lang.String optionKey,
java.lang.String optionValue) |
void |
setRootTopic(Topic t) |
void |
setViewCoordinates(double x,
double y) |
void |
setViewCoordinates(Tuples.T2<java.lang.Double,java.lang.Double> p) |
void |
setViewFilterInfo(boolean b) |
void |
startThread() |
void |
stopThread() |
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 |
update(java.awt.Graphics g) |
private void |
updateClusters(TopicMapGraphPanel.Cluster c1,
TopicMapGraphPanel.Cluster c2) |
void |
updateCursor(java.awt.Cursor cursor) |
void |
updateMouseWorldCoordinates(int x,
int y) |
void |
updateWorld() |
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, 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
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, 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, transferFocusUpCycle
private java.lang.String OPTIONS_PREFIX
private java.lang.String OPTIONS_VIEW_PREFIX
private boolean makeLocalSettingsGlobal
private VModel model
private TopicMapModel tmModel
private GraphFilter graphFilter
private java.lang.Thread thread
private double framerate
private boolean running
private boolean animation
private boolean freeze
private boolean labelEdges
private boolean cropNodeBoxes
private java.awt.image.BufferedImage doubleBuffer
private Projection projection
private double mouseX
private double mouseY
private VNode mouseOverNode
private VEdge mouseOverEdge
private boolean freezeForPopup
private boolean freezeForMouseOver
private double minX
private double maxX
private double minY
private double maxY
private java.util.HashMap renderingHints
private Topic rootTopic
private VNode followNode
public static final int TOOL_OPEN
public static final int TOOL_SELECT
public static final int TOOL_ASSOCIATION
public static final int TOOL_ERASER
private int mouseTool
private MouseToolManager mouseToolManager
private java.util.ArrayList<Tuples.T2<java.lang.Double,java.lang.Double>> selectPath
private Wandora wandora
private Options options
private boolean needsRefresh
private FilterManagerPanel filterManagerPanel
private javax.swing.JDialog filterDialog
private java.awt.Font infoFont
private java.awt.FontMetrics infoFontMetrics
private boolean viewInfo
private boolean viewFilterInfo
private volatile double fps
public void setFilterManagerPanel(FilterManagerPanel filterManagerPanel)
public void openFilterManager()
public void updateMouseWorldCoordinates(int x, int y)
public void setMouseFollowNode(VNode node)
public void setFreezeForPopup(boolean b)
public Tuples.T2<java.lang.Double,java.lang.Double> getMouseWorldCoordinates()
public Tuples.T2<java.lang.Double,java.lang.Double> getViewCoordinates()
public void setViewCoordinates(Tuples.T2<java.lang.Double,java.lang.Double> p)
public void setViewCoordinates(double x, double y)
public VNode getMouseOverNode()
public Topic getMouseOverTopic()
public VEdge getMouseOverEdge()
public Association getMouseOverAssociation()
public VModel getModel()
public TopicMapModel getTopicMapModel()
public int getMouseTool()
public void setMouseTool(int tool)
public void updateCursor(java.awt.Cursor cursor)
public static java.lang.String getToolName(int toolType)
public static java.lang.String getToolDescription(int toolType)
public Topic getRootTopic()
public VNode getRootNode()
public java.util.Set<VEdge> getSelectedEdges()
public java.util.Set<VNode> getSelectedNodes()
public java.util.Collection<Topic> getSelectedTopics()
public void clearModel()
public void remakeModels(TopicMap tm)
public void setRootTopic(Topic t)
public Wandora getWandora()
public void setViewFilterInfo(boolean b)
public boolean getViewFilterInfo()
public void setCropNodeBoxes(boolean b)
public boolean getCropNodeBoxes()
public void setFramerate(double fr)
public double getFramerate()
public void setFreezeForMouseOver(boolean b)
public boolean getFreezeForMouseOver()
public void setLabelEdges(boolean b)
public boolean getLabelEdges()
public void setAnimationEnabled(boolean b)
public boolean getAnimationEnabled()
private void setOption(java.lang.String optionKey, java.lang.String optionValue)
public void setAntialized(boolean b)
public boolean getAntialized()
public GraphFilter getGraphFilter()
public void startThread()
public void stopThread()
private java.util.ArrayList<TopicMapGraphPanel.Cluster> doClustering()
private void updateClusters(TopicMapGraphPanel.Cluster c1, TopicMapGraphPanel.Cluster c2)
public void updateWorld()
public Projection getProjection()
public void update(java.awt.Graphics g)
update
in class javax.swing.JComponent
public java.util.HashMap getRenderingHints()
public void paint(java.awt.Graphics g)
paint
in class javax.swing.JComponent
public void run()
run
in interface java.lang.Runnable
public void componentShown(java.awt.event.ComponentEvent e)
componentShown
in interface java.awt.event.ComponentListener
public void componentResized(java.awt.event.ComponentEvent e)
componentResized
in interface java.awt.event.ComponentListener
public void componentHidden(java.awt.event.ComponentEvent e)
componentHidden
in interface java.awt.event.ComponentListener
public void componentMoved(java.awt.event.ComponentEvent e)
componentMoved
in interface java.awt.event.ComponentListener
public void selectNodesWithPath(java.util.ArrayList<Tuples.T2<java.lang.Double,java.lang.Double>> path)
public boolean lockMouseTool(MouseTool tool)
public void releaseMouseTool()
public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged
in interface java.awt.event.MouseMotionListener
public void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved
in interface java.awt.event.MouseMotionListener
public void mouseWheelMoved(java.awt.event.MouseWheelEvent e)
mouseWheelMoved
in interface java.awt.event.MouseWheelListener
public javax.swing.JPopupMenu getGeneralMenu()
public javax.swing.JPopupMenu getEdgeMenu()
public javax.swing.JPopupMenu getNodeMenu()
public java.lang.Object[] getOptionsMenuStruct()
private Topic getNewTopicFor(Topic t, TopicMap tm) throws TopicMapException
TopicMapException
private Association getNewAssociationFor(Association a, TopicMap tm) throws TopicMapException
TopicMapException
public void refreshGraph()
public void doRefresh() throws TopicMapException
doRefresh
in interface RefreshListener
TopicMapException
public void topicTypeChanged(Topic t, Topic added, Topic removed) throws TopicMapException
TopicMapListener
topicTypeChanged
in interface TopicMapListener
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 keyTyped(java.awt.event.KeyEvent e)
keyTyped
in interface java.awt.event.KeyListener
public void keyReleased(java.awt.event.KeyEvent e)
keyReleased
in interface java.awt.event.KeyListener
public void keyPressed(java.awt.event.KeyEvent e)
keyPressed
in interface java.awt.event.KeyListener
private void initComponents()
Copyright 2004-2015 Wandora Team