|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.formaria.editor.visualizer.ModelVisualiserPanel
public class ModelVisualiserPanel
The main panel of the data model visualization.
Copyright (c) Formaria Ltd., 2001-2006, This software is licensed under the GNU Public License (GPL), please see license.txt for more details. If you make commercial use of this software you must purchase a commercial license from Formaria.
$Revision: 1.18 $
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JPanel |
|---|
javax.swing.JPanel.AccessibleJPanel |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
javax.swing.JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
java.awt.Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary |
|---|
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
ModelVisualiserPanel(int preferredWidth)
|
|
ModelVisualiserPanel(int preferredWidth,
VisualiserDebuggerEngine dEngine)
|
|
| Method Summary | |
|---|---|
void |
addAttribute(java.lang.String path,
java.lang.String attribName)
Add an attribute to the model |
void |
addMessageNode(java.lang.String message)
Set a message in an empty tree |
void |
addNode(java.lang.String path,
java.lang.String name)
Add a new node to the model |
void |
addTable(java.lang.String path,
java.lang.String name,
int nrows,
int ncols)
Add a new table model to the model |
void |
centerScreen(java.awt.Rectangle parentRect)
Centre the panel on screen. |
void |
copyAttrPathToClipboard()
Copies selected attribute path to the clipboard |
void |
copyNodePathToClipboard()
Copies selected node path to the clipboard |
boolean |
debugView()
|
void |
deleteAttribute(java.lang.String path,
java.lang.String attribName)
Delete the selected attribute from the model |
void |
deleteNode(java.lang.String path)
Deletes selected node from the model |
VisualiserDebuggerModel |
getDebuggerModel()
|
ModelVisualiserTree |
getModelVisualiserTree()
Get the model tree |
java.lang.String |
getProjectPath()
|
DataModel |
getRootModel()
|
protected javax.swing.JSplitPane |
getSplitPane()
Get the splitpane |
protected java.lang.String |
getTreePath()
Get the path of the selected treenode by looping the selected path array and placing a '/' between each item |
protected boolean |
isDbTableNodeSelected()
Determines whether selected node is a database table node |
void |
mouseClicked(java.awt.event.MouseEvent me)
The mouse was clicked on this component |
void |
mouseEntered(java.awt.event.MouseEvent me)
The mouse entered this component's area |
void |
mouseExited(java.awt.event.MouseEvent me)
The mouse exited this component's area |
void |
mousePressed(java.awt.event.MouseEvent me)
The mouse button was pressed while over this component |
void |
mouseReleased(java.awt.event.MouseEvent me)
Responds to a mouse button release by poping up a context menu for the component |
void |
propertyChange(java.beans.PropertyChangeEvent evt)
This method gets called when a bound property is changed |
void |
refresh(java.lang.String selectedPath)
Refresh the model representation |
void |
renameNode(java.lang.String path,
java.lang.String name)
Reset the node's ID |
void |
setDebuggerModel(VisualiserDebuggerModel dModel)
|
void |
setModelTreeListener(ModelTreeListener mtl)
Set listener for the tree |
void |
setNodeValue(java.lang.String path,
java.lang.String attribName,
java.lang.String value)
Reset the node's value |
void |
setProjectPath(java.lang.String ppath)
|
void |
setRootModel(DataModel root)
Set the root mode node displayed by this visualizer |
void |
setSelectedPath(java.lang.String path)
Set the selected path in the tree |
void |
valueChanged(javax.swing.event.TreeSelectionEvent evt)
Update the table following a tree selection change |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class javax.swing.JComponent |
|---|
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, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, 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 |
| Methods inherited from class java.awt.Container |
|---|
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, 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, 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, hide, 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, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ModelVisualiserPanel(int preferredWidth,
VisualiserDebuggerEngine dEngine)
public ModelVisualiserPanel(int preferredWidth)
| Method Detail |
|---|
public boolean debugView()
public void setRootModel(DataModel root)
root - the root of the node hierarchypublic void addMessageNode(java.lang.String message)
message - the new message textpublic void setModelTreeListener(ModelTreeListener mtl)
the - listenerpublic void setSelectedPath(java.lang.String path)
the - selection pathprotected javax.swing.JSplitPane getSplitPane()
public ModelVisualiserTree getModelVisualiserTree()
public void valueChanged(javax.swing.event.TreeSelectionEvent evt)
valueChanged in interface javax.swing.event.TreeSelectionListenerprotected java.lang.String getTreePath()
public void centerScreen(java.awt.Rectangle parentRect)
public void mouseClicked(java.awt.event.MouseEvent me)
mouseClicked in interface java.awt.event.MouseListenerme - the mouse eventpublic void mousePressed(java.awt.event.MouseEvent me)
mousePressed in interface java.awt.event.MouseListenerme - the mouse eventpublic void mouseReleased(java.awt.event.MouseEvent me)
mouseReleased in interface java.awt.event.MouseListenerme - public void mouseEntered(java.awt.event.MouseEvent me)
mouseEntered in interface java.awt.event.MouseListenerme - the mouse eventpublic void mouseExited(java.awt.event.MouseEvent me)
mouseExited in interface java.awt.event.MouseListenerme - the mouse eventpublic void refresh(java.lang.String selectedPath)
selectedPath - the selected path in the tree or null for no sleectionpublic void copyNodePathToClipboard()
public void copyAttrPathToClipboard()
protected boolean isDbTableNodeSelected()
public void addAttribute(java.lang.String path,
java.lang.String attribName)
path - the selected pathattribName - the new attribute name
public void deleteAttribute(java.lang.String path,
java.lang.String attribName)
public void addNode(java.lang.String path,
java.lang.String name)
path - the path of the parent nodename - the name/ID of the new node
public void addTable(java.lang.String path,
java.lang.String name,
int nrows,
int ncols)
path - the path of the parent nodename - the name/ID of the new nodepublic void deleteNode(java.lang.String path)
path - the path of the model node
public void renameNode(java.lang.String path,
java.lang.String name)
path - the path of the parent nodename - the name/ID of the new node
public void setNodeValue(java.lang.String path,
java.lang.String attribName,
java.lang.String value)
path - the path of the parent nodename - the name/ID of the new nodepublic VisualiserDebuggerModel getDebuggerModel()
public void setDebuggerModel(VisualiserDebuggerModel dModel)
public DataModel getRootModel()
public void setProjectPath(java.lang.String ppath)
public java.lang.String getProjectPath()
public void propertyChange(java.beans.PropertyChangeEvent evt)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||