|
|||||||||||
| 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.JLabel
com.tensegrity.gui.swing.repository.AbstractRepositoryItem
com.tensegrity.gui.swing.repository.VisualGraphObjectRepositoryItem
The VisualGraphObjectRepositoryItem is used to display a
VisualGraphObject into a JLabel and can be used
within any context of the java swing API.
Additionally to display the VisualGraphObject this
VisualGraphObjectRepositoryItem enables the drag and drop
mechanism of the java swing API such that the VisualGraphObject
can be dragged out of the repository item and dropped onto any appropriate
control.
| Nested Class Summary | |
static interface |
VisualGraphObjectRepositoryItem.DragActionListener
A listener that will be notified when a drag action started or ended concerning a VisualGraphObjectRepositoryItem item. |
| Nested classes inherited from class javax.swing.JLabel |
javax.swing.JLabel.AccessibleJLabel |
| Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
| Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary |
| Fields inherited from class javax.swing.JLabel |
labelFor |
| 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 javax.swing.SwingConstants |
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
VisualGraphObjectRepositoryItem(DragContext vgoDragSource,
VisualGraphObject vgo,
java.lang.String tooltip)
Deprecated. Do not use this constructor anymore to avoid hardwired non-localized tooltip. Use VisualGraphObjectRepositoryItem(DragContext, VisualGraphObject, UIManager, String)
instead. |
|
VisualGraphObjectRepositoryItem(DragContext vgoDragSource,
VisualGraphObject vgo,
java.lang.String tooltip,
java.lang.String iconpath,
java.lang.Class resourceclass)
Deprecated. Do not use this constructor anymore to avoid hardwired non-localized tooltip. Use VisualGraphObjectRepositoryItem(DragContext, VisualGraphObject, UIManager, String, String, Class)
instead. |
|
VisualGraphObjectRepositoryItem(DragContext vgoDragSource,
VisualGraphObject vgo,
UIManager uiManager,
java.lang.String tooltipID)
Constructor for VisualGraphObjectRepositoryItem based on the
VisualGraphObject and a DragContext
required for proper drag and drop support. |
|
VisualGraphObjectRepositoryItem(DragContext vgoDragSource,
VisualGraphObject vgo,
UIManager uiManager,
java.lang.String tooltip,
java.lang.String iconpath,
java.lang.Class resourceclass)
Constructor for VisualGraphObjectRepositoryItem based on the
VisualGraphObject. |
|
| Method Summary | |
void |
addDragActionListener(VisualGraphObjectRepositoryItem.DragActionListener dal)
Adds an listener that will be called when a drag operation started |
void |
applyEvList()
Tells the component to apply its UIItemEvaluationList. |
protected void |
endDrag(java.awt.dnd.DragSourceDropEvent event)
Called when a dragging operation ends. |
VisualGraphObject[] |
getAdditionalVGOS()
|
BaseComposite |
getComposite()
Returns the BaseComposite of the internal VisualGraphObject. |
java.util.List |
getComposites()
Returns all basecomposites that are referenced by the repository item - The drag representation (which was given as constructor argument) - The base composite used to render the icon - Additional objects that have been added to this item |
void |
installEvList()
Tells the component to setup its internal state. |
void |
removeDragActionListener(VisualGraphObjectRepositoryItem.DragActionListener dal)
Removes an listener that will be called when a drag operation started |
void |
revalidateIcon()
Revalidates the icon representation for this repository item after changes to the visual graph object. |
void |
setAdditionalVGOS(VisualGraphObject[] additional_vgos)
|
void |
setBorder(javax.swing.border.Border border)
|
void |
setIcon(javax.swing.Icon icon)
|
protected boolean |
startDrag(java.awt.dnd.DragGestureEvent event)
Called when a dragging operation starts. |
| Methods inherited from class com.tensegrity.gui.swing.repository.AbstractRepositoryItem |
getDefaultBackground, getDefaultBorder, getDefaultInsets, getHighlightColor, getHoveredBorder, getHoveredInsets, getInsets, getInsets, getPressedBackground, getPressedColor, getUnpressedColor, isHighlighted, mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased, paintBorder, setDefaultBackground, setDefaultBorder, setDefaultInsets, setHighlightColor, setHighlighted, setHoveredBorder, setHoveredInsets, setPressedBackground |
| Methods inherited from class javax.swing.JLabel |
checkHorizontalKey, checkVerticalKey, getAccessibleContext, getDisabledIcon, getDisplayedMnemonic, getDisplayedMnemonicIndex, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getLabelFor, getText, getUI, getUIClassID, getVerticalAlignment, getVerticalTextPosition, imageUpdate, paramString, setDisabledIcon, setDisplayedMnemonic, setDisplayedMnemonic, setDisplayedMnemonicIndex, setHorizontalAlignment, setHorizontalTextPosition, setIconTextGap, setLabelFor, setText, setUI, setVerticalAlignment, setVerticalTextPosition, updateUI |
| Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, 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, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, 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, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, 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 VisualGraphObjectRepositoryItem(DragContext vgoDragSource,
VisualGraphObject vgo,
java.lang.String tooltip,
java.lang.String iconpath,
java.lang.Class resourceclass)
VisualGraphObjectRepositoryItem(DragContext, VisualGraphObject, UIManager, String, String, Class)
instead.
VisualGraphObjectRepositoryItem based on the
VisualGraphObject.
vgoDragSource - the DragContext
instance to use and update when the VisualGraphObject is
transferred via drag and dropvgo - the VisualGraphObject instance to display and
transfer.tooltip - the tooltip to display.iconpath - string representing a path to an icon to be used instead of
the VisualGraphObject.resourceclass - Class to be used to load the icon.
public VisualGraphObjectRepositoryItem(DragContext vgoDragSource,
VisualGraphObject vgo,
UIManager uiManager,
java.lang.String tooltip,
java.lang.String iconpath,
java.lang.Class resourceclass)
VisualGraphObjectRepositoryItem based on the
VisualGraphObject.
vgoDragSource - the DragContext
instance to use and update when the VisualGraphObject is
transferred via drag and dropvgo - the VisualGraphObject instance to display and
transfer.uiManager - UIManager to obtain localized text from.tooltip - the tooltip to display.iconpath - string representing a path to an icon to be used instead of
the VisualGraphObject.resourceclass - Class to be used to load the icon.
public VisualGraphObjectRepositoryItem(DragContext vgoDragSource,
VisualGraphObject vgo,
UIManager uiManager,
java.lang.String tooltipID)
VisualGraphObjectRepositoryItem based on the
VisualGraphObject and a DragContext
required for proper drag and drop support. Use the UIManager to enable this
item to have a localized tooltip, which changes to the selected language
whenever the enclosing application changes the language.
vgoDragSource - DragContext for proper drag and drop support.vgo - the VisualGraphObject for this RepositoryItem.uiManager - UIManager to obtain localized text from.tooltipID - the GUI id for the text resource for the tooltip.
public VisualGraphObjectRepositoryItem(DragContext vgoDragSource,
VisualGraphObject vgo,
java.lang.String tooltip)
VisualGraphObjectRepositoryItem(DragContext, VisualGraphObject, UIManager, String)
instead.
VisualGraphObjectRepositoryItem based on
the given vgo. A DragContext is required
for the proper drag and drop support and a tooltip to be
displayed whenever the system considers this as useful.
vgoDragSource - DragContext for proper drag and drop support.vgo - the VisualGraphObject for this RepositoryItem.tooltip - the tooltip.| Method Detail |
public void revalidateIcon()
public void setAdditionalVGOS(VisualGraphObject[] additional_vgos)
public VisualGraphObject[] getAdditionalVGOS()
public BaseComposite getComposite()
public java.util.List getComposites()
protected boolean startDrag(java.awt.dnd.DragGestureEvent event)
event - The event that started the drag
protected void endDrag(java.awt.dnd.DragSourceDropEvent event)
event - The event that triggered the callpublic void installEvList()
Evaluable
installEvList in interface Evaluablepublic void applyEvList()
EvaluableUIItemEvaluationList.
applyEvList in interface Evaluablepublic void addDragActionListener(VisualGraphObjectRepositoryItem.DragActionListener dal)
dal - The listener to addpublic void removeDragActionListener(VisualGraphObjectRepositoryItem.DragActionListener dal)
dal - The listener to removepublic void setBorder(javax.swing.border.Border border)
public void setIcon(javax.swing.Icon icon)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||