|
|||||||||
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.JList
com.mindfusion.diagramming.NodeListView
public class NodeListView
Represents a list box with MindFusion.Diagramming.DiagramNode objects.
Nested Class Summary | |
---|---|
class |
NodeListView.NodeTransferHandler
|
Nested classes/interfaces inherited from class javax.swing.JList |
---|
javax.swing.JList.AccessibleJList, javax.swing.JList.DropLocation |
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.JList |
---|
HORIZONTAL_WRAP, VERTICAL, VERTICAL_WRAP |
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 | |
---|---|
NodeListView()
Initializes a new instance of the NodeListView class. |
Method Summary | |
---|---|
void |
addNode(DiagramNode node)
Adds a new node to the end of the list view. |
void |
addNode(DiagramNode node,
java.lang.String label)
Adds a new node to the end of the list view. |
void |
addNodeListViewListener(NodeListViewListener listener)
Registers listener so that it will receive events when
users select or delete nodes from the list. |
void |
addNodes(DiagramNode[] nodes,
java.lang.String[] labels)
Adds the specified nodes to the end of the list box. |
void |
addNodes(DiagramNodeList nodes)
Adds the specified nodes to the end of the list box. |
void |
addNodes(DiagramNodeList nodes,
java.lang.String[] labels)
Adds the specified nodes to the end of the list box. |
void |
clearNodes()
Removes all nodes from the list view. |
boolean |
getAllowRemove()
Gets a value indicating whether to allow deletion of list nodes by pressing Del. |
java.awt.geom.Dimension2D |
getDefaultNodeSize()
Gets the default size with which nodes dragged onto a diagram will be created. |
java.awt.Dimension |
getIconMargin()
Gets the horizontal and vertical margins around the nodes. |
java.awt.Dimension |
getIconSize()
Gets the size of the nodes displayed in the list. |
int |
getMeasureUnit()
Gets the unit of measure used when drawing nodes. |
DiagramNode |
getNodeAt(int index)
Gets the node at the specified position. |
int |
getNodesCount()
Gets the number of nodes in the list view. |
void |
insertNode(int index,
DiagramNode node)
Inserts the node at the specified position. |
void |
insertNode(int index,
DiagramNode node,
java.lang.String label)
Inserts the node at the specified position. |
boolean |
isShowLabels()
Gets a value indicating whether to show text labels along with icons for each list item. |
protected void |
onItemSelected(javax.swing.event.ListSelectionEvent e)
|
protected void |
onKeyPressed(java.awt.event.KeyEvent e)
|
protected void |
onMousePressed(java.awt.event.MouseEvent e)
|
protected void |
onNodeRemoved(NodeListEvent e)
|
protected void |
onNodeSelected(NodeListEvent e)
|
void |
removeNodeAt(int index)
Removes the node at the specified position. |
void |
removeNodeListViewListener(NodeListViewListener listener)
Unregisters listener so that it will no longer
receive NodeListView events. |
void |
setAllowRemove(boolean value)
Sets a value indicating whether to allow deletion of list nodes by pressing Del. |
void |
setDefaultNodeSize(java.awt.geom.Dimension2D value)
Sets the default size with which nodes dragged onto a diagram will be created. |
void |
setIconMargin(java.awt.Dimension value)
Sets the horizontal and vertical margins around the nodes. |
void |
setIconSize(java.awt.Dimension value)
Sets the size of the nodes displayed in the list. |
void |
setMeasureUnit(int value)
Sets the unit of measure used when drawing nodes. |
void |
setShowLabels(boolean value)
Sets a value specifying whether to show text labels along with icons for each list item. |
protected void |
updateComponentResize()
|
Methods inherited from class javax.swing.JList |
---|
addListSelectionListener, addSelectionInterval, clearSelection, createSelectionModel, ensureIndexIsVisible, fireSelectionValueChanged, getAccessibleContext, getAnchorSelectionIndex, getCellBounds, getCellRenderer, getDragEnabled, getDropLocation, getDropMode, getFirstVisibleIndex, getFixedCellHeight, getFixedCellWidth, getLastVisibleIndex, getLayoutOrientation, getLeadSelectionIndex, getListSelectionListeners, getMaxSelectionIndex, getMinSelectionIndex, getModel, getNextMatch, getPreferredScrollableViewportSize, getPrototypeCellValue, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectedIndex, getSelectedIndices, getSelectedValue, getSelectedValues, getSelectionBackground, getSelectionForeground, getSelectionMode, getSelectionModel, getToolTipText, getUI, getUIClassID, getValueIsAdjusting, getVisibleRowCount, indexToLocation, isSelectedIndex, isSelectionEmpty, locationToIndex, paramString, removeListSelectionListener, removeSelectionInterval, setCellRenderer, setDragEnabled, setDropMode, setFixedCellHeight, setFixedCellWidth, setLayoutOrientation, setListData, setListData, setModel, setPrototypeCellValue, setSelectedIndex, setSelectedIndices, setSelectedValue, setSelectionBackground, setSelectionForeground, setSelectionInterval, setSelectionMode, setSelectionModel, setUI, setValueIsAdjusting, setVisibleRowCount, 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, 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 NodeListView()
Method Detail |
---|
protected void updateComponentResize()
protected void onKeyPressed(java.awt.event.KeyEvent e)
protected void onItemSelected(javax.swing.event.ListSelectionEvent e)
protected void onMousePressed(java.awt.event.MouseEvent e)
public int getMeasureUnit()
GraphicsUnit
constants.public void setMeasureUnit(int value)
value
- One of the GraphicsUnit
constants.public java.awt.Dimension getIconSize()
Dimension
instance specifying the node size.public void setIconSize(java.awt.Dimension value)
value
- A Dimension
instance specifying the node size.public java.awt.Dimension getIconMargin()
Dimension
instance specifying the icon margins.public void setIconMargin(java.awt.Dimension value)
value
- A Dimension
instance specifying the icon margins.public java.awt.geom.Dimension2D getDefaultNodeSize()
Dimension2D
instance specifying the size of created nodes.public void setDefaultNodeSize(java.awt.geom.Dimension2D value)
value
- A Dimension2D
instance specifying the size of created nodes.public boolean getAllowRemove()
public void setAllowRemove(boolean value)
value
- true to allow node deletion, otherwise false.public void addNode(DiagramNode node)
node
- The node to add.public void addNode(DiagramNode node, java.lang.String label)
node
- The node to add.label
- The text to be displayed for the node.public void addNodes(DiagramNodeList nodes)
nodes
- The collection of nodes to add.public void addNodes(DiagramNodeList nodes, java.lang.String[] labels)
nodes
- The collection of nodes to add.labels
- The array of texts to be displayed for the nodes.public void addNodes(DiagramNode[] nodes, java.lang.String[] labels)
nodes
- The array of nodes to add.labels
- The array of texts to be displayed for the nodes.public void insertNode(int index, DiagramNode node)
index
- The zero-based index at which the node should be inserted.node
- The node to insert.public void insertNode(int index, DiagramNode node, java.lang.String label)
index
- The zero-based index at which the node should be inserted.node
- The node to insert. The text to be displayed for the node.public void removeNodeAt(int index)
index
- The zero-based index of the node to remove.public void clearNodes()
public DiagramNode getNodeAt(int index)
index
- An integer value specifying the node's index in the list.
DiagramNode
at the specified position.public int getNodesCount()
protected void onNodeSelected(NodeListEvent e)
protected void onNodeRemoved(NodeListEvent e)
public void addNodeListViewListener(NodeListViewListener listener)
listener
so that it will receive events when
users select or delete nodes from the list.
listener
- An object implementing the NodeListViewListener
interface.public void removeNodeListViewListener(NodeListViewListener listener)
listener
so that it will no longer
receive NodeListView events.
listener
- An object implementing the NodeListViewListener
interface.public boolean isShowLabels()
true
if labels are shown.public void setShowLabels(boolean value)
value
- true
if text labels must be shown, otherwise false
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |