ilog.cpl.network.action.toolbar
Class IlpNetworkSelectButton

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.AbstractButton
                  extended by javax.swing.JToggleButton
                      extended by ilog.cpl.graph.action.toolbar.IlpGraphInteractorButton
                          extended by ilog.cpl.network.action.toolbar.IlpNetworkInteractorButton
                              extended by ilog.cpl.network.action.toolbar.IlpNetworkSelectButton
All Implemented Interfaces:
ImageObserver, ItemSelectable, MenuContainer, Serializable, Accessible, SwingConstants

public class IlpNetworkSelectButton
extends IlpNetworkInteractorButton

This button sets a selection interactor on the view.

Since:
JTGO 3.0
See Also:
IltSelectInteractor, IlpNetworkSelectAction, IlpNetworkInteractorButton, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JToggleButton
JToggleButton.AccessibleJToggleButton, JToggleButton.ToggleButtonModel
 
Nested classes/interfaces inherited from class javax.swing.AbstractButton
AbstractButton.AccessibleAbstractButton, AbstractButton.ButtonChangeListener
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class javax.swing.AbstractButton
actionListener, BORDER_PAINTED_CHANGED_PROPERTY, changeEvent, changeListener, CONTENT_AREA_FILLED_CHANGED_PROPERTY, DISABLED_ICON_CHANGED_PROPERTY, DISABLED_SELECTED_ICON_CHANGED_PROPERTY, FOCUS_PAINTED_CHANGED_PROPERTY, HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY, ICON_CHANGED_PROPERTY, itemListener, MARGIN_CHANGED_PROPERTY, MNEMONIC_CHANGED_PROPERTY, model, MODEL_CHANGED_PROPERTY, PRESSED_ICON_CHANGED_PROPERTY, ROLLOVER_ENABLED_CHANGED_PROPERTY, ROLLOVER_ICON_CHANGED_PROPERTY, ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY, SELECTED_ICON_CHANGED_PROPERTY, TEXT_CHANGED_PROPERTY, VERTICAL_ALIGNMENT_CHANGED_PROPERTY, VERTICAL_TEXT_POSITION_CHANGED_PROPERTY
 
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
IlpNetworkSelectButton(IlpViewsView view)
          Creates the button.
 
Method Summary
 int getMoveThreshold()
          Returns the threshold after which a graphic object starts to move.
 int getMultipleSelectionModifier()
          Returns the multiple selection modifier.
 int getSelectionModifier()
          Returns the selection modifier.
 boolean isDragAllowed()
          Returns true if the interactor lets the user select objects by dragging a rectangle, false otherwise.
 boolean isEditingAllowed()
          Returns true if the interactor lets the user edit objects by dispatching the events to the interactor attached to the selection object.
 boolean isMoveAllowed()
          Returns true if the interactor lets the user move objects, false otherwise.
 boolean isMultipleSelectionMode()
          Returns true if the interactor allows the user to select multiple objects simultaneously.
 boolean isOpaqueDragSelection()
          Returns an indication of whether the interactor is in Opaque Multiple Selection mode or not.
 boolean isOpaqueMove()
          Returns whether the interactor is in Opaque Move mode or not.
 boolean isOpaquePolyPointsEdition()
          Returns an indication of whether the interactor is in Opaque PolyPoints Editing mode or not.
 boolean isOpaqueResize()
          Returns an indication of whether the interactor is in Opaque Resize mode or not.
 boolean isShowingMovingObject()
          Returns true if the interactor shows the object when the object is being moved.
 void setDragAllowed(boolean allow)
          Lets you enable or disable the mode that allows you to select objects by dragging a rectangle over them.
 void setEditingAllowed(boolean allow)
          Lets you enable or disable the mode that allows you to edit objects with the interactor.
 void setMoveAllowed(boolean allow)
          Lets you enable or disable the mode that allows you to move objects with this interactor.
 void setMoveThreshold(int threshold)
          Changes the threshold after which a graphic object starts to move.
 void setMultipleSelectionMode(boolean allow)
          Lets you enable or disable the mode that allows you to select several objects simultaneously.
 void setMultipleSelectionModifier(int modifier)
          Sets the multiple selection modifier.
 void setOpaqueDragSelection(boolean set)
          Sets the interactor in Opaque Multiple Selection mode.
 void setOpaqueMove(boolean set)
          Sets the interactor mode to Opaque Move.
 void setOpaquePolyPointsEdition(boolean set)
          Sets the interactor in Opaque PolyPoints Editing mode.
 void setOpaqueResize(boolean set)
          Sets the interactor in Opaque Resize mode.
 void setSelectionModifier(int modifier)
          Sets the selection modifier.
 void setShowingMovingObject(boolean set)
          Modifies the ghost drawn when the object is moved.
 
Methods inherited from class ilog.cpl.graph.action.toolbar.IlpGraphInteractorButton
getIlpInteractor, getIlvInteractor, getLocationOnScreen, getPopupMenuFactory, init, init, isUsingObjectInteractor, isXORGhost, setPopupMenuFactory, setUsingObjectInteractor, setXORGhost
 
Methods inherited from class javax.swing.JToggleButton
getAccessibleContext, getUIClassID, paramString, updateUI
 
Methods inherited from class javax.swing.AbstractButton
addActionListener, addChangeListener, addImpl, addItemListener, checkHorizontalKey, checkVerticalKey, configurePropertiesFromAction, createActionListener, createActionPropertyChangeListener, createChangeListener, createItemListener, doClick, doClick, fireActionPerformed, fireItemStateChanged, fireStateChanged, getAction, getActionCommand, getActionListeners, getChangeListeners, getDisabledIcon, getDisabledSelectedIcon, getDisplayedMnemonicIndex, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getItemListeners, getLabel, getMargin, getMnemonic, getModel, getMultiClickThreshhold, getPressedIcon, getRolloverIcon, getRolloverSelectedIcon, getSelectedIcon, getSelectedObjects, getText, getUI, getVerticalAlignment, getVerticalTextPosition, imageUpdate, init, isBorderPainted, isContentAreaFilled, isFocusPainted, isRolloverEnabled, isSelected, paintBorder, removeActionListener, removeChangeListener, removeItemListener, setAction, setActionCommand, setBorderPainted, setContentAreaFilled, setDisabledIcon, setDisabledSelectedIcon, setDisplayedMnemonicIndex, setEnabled, setFocusPainted, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabel, setLayout, setMargin, setMnemonic, setMnemonic, setModel, setMultiClickThreshhold, setPressedIcon, setRolloverEnabled, setRolloverIcon, setRolloverSelectedIcon, setSelected, setSelectedIcon, setText, setUI, setVerticalAlignment, setVerticalTextPosition
 
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, 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, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, 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, 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, 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, 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, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, 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

IlpNetworkSelectButton

public IlpNetworkSelectButton(IlpViewsView view)
Creates the button.

Parameters:
view - The view on which to operate.
Method Detail

isMultipleSelectionMode

public boolean isMultipleSelectionMode()
Returns true if the interactor allows the user to select multiple objects simultaneously.


setMultipleSelectionMode

public void setMultipleSelectionMode(boolean allow)
Lets you enable or disable the mode that allows you to select several objects simultaneously.


isMoveAllowed

public boolean isMoveAllowed()
Returns true if the interactor lets the user move objects, false otherwise.


setMoveAllowed

public void setMoveAllowed(boolean allow)
Lets you enable or disable the mode that allows you to move objects with this interactor.


isDragAllowed

public boolean isDragAllowed()
Returns true if the interactor lets the user select objects by dragging a rectangle, false otherwise.


setDragAllowed

public void setDragAllowed(boolean allow)
Lets you enable or disable the mode that allows you to select objects by dragging a rectangle over them.


isEditingAllowed

public boolean isEditingAllowed()
Returns true if the interactor lets the user edit objects by dispatching the events to the interactor attached to the selection object.


setEditingAllowed

public void setEditingAllowed(boolean allow)
Lets you enable or disable the mode that allows you to edit objects with the interactor.


getMoveThreshold

public int getMoveThreshold()
Returns the threshold after which a graphic object starts to move. A graphic object will start to move only if the user moves it at a distance bigger than this threshold. Note that the threshold is in pixels and that the default value is 2.


setMoveThreshold

public void setMoveThreshold(int threshold)
Changes the threshold after which a graphic object starts to move. A graphic object will start to move only if the user moves it at a distance bigger than this threshold. Note that the threshold is in pixels and that the default value is 2.


isOpaqueMove

public boolean isOpaqueMove()
Returns whether the interactor is in Opaque Move mode or not. The interactor has two modes to move a graphic object: Opaque Move mode and Ghost Move mode. In Opaque Move mode, the position of the object that the user moves is changed for each drag event. In Ghost Move mode, the position of the object is changed only when the user releases the mouse button. The default mode is Ghost Move mode.


setOpaqueMove

public void setOpaqueMove(boolean set)
Sets the interactor mode to Opaque Move. The interactor has two modes to move a graphic object: Opaque Move mode and Ghost Move mode. In Opaque Move mode, the position of the object that the user moves is changed for each drag event. In Ghost Move mode, the position of the object is changed only when the user releases the mouse button. The default mode is Ghost Move mode.


isShowingMovingObject

public boolean isShowingMovingObject()
Returns true if the interactor shows the object when the object is being moved. Returns false if a rectangle showing the bounding box of the object is shown when the object is being moved.


setShowingMovingObject

public void setShowingMovingObject(boolean set)
Modifies the ghost drawn when the object is moved. If the value is false, a rectangle showing the bounding box of the object is drawn while moving the object, otherwise a ghost showing the object is drawn. Note that this method has no meaning when the interactor is in Opaque Move mode.


isOpaqueDragSelection

public boolean isOpaqueDragSelection()
Returns an indication of whether the interactor is in Opaque Multiple Selection mode or not.


setOpaqueDragSelection

public void setOpaqueDragSelection(boolean set)
Sets the interactor in Opaque Multiple Selection mode. The interactor has two modes to select graphic objects by dragging a rectangle around them: The Opaque Multiple Selection mode and the Ghost Multiple Selection mode.

In Opaque Multiple Selection mode, while the user drags the selection rectangle, the previous rectangle is erased by redrawing the corresponding regions of the view. This mode may be slower because it requires partial redraws of the manager, but it is safer because it behaves well if animated gif images are used.

In Ghost Multiple Selection mode, the previous selection rectangle is erased by drawing it again (in XOR mode).

The default mode is the Ghost Multiple Selection mode.


isOpaqueResize

public boolean isOpaqueResize()
Returns an indication of whether the interactor is in Opaque Resize mode or not.


setOpaqueResize

public void setOpaqueResize(boolean set)
Sets the interactor in Opaque Resize mode. The interactor has two modes to resize a graphic object: The Opaque Resize mode and the Ghost Resize mode. In Opaque Resize mode, the size of the object that the user resizes is changed for each drag event. In Ghost Resize mode, the size of the object is changed only when the user releases the mouse button. The default mode is the Ghost Resize mode.


isOpaquePolyPointsEdition

public boolean isOpaquePolyPointsEdition()
Returns an indication of whether the interactor is in Opaque PolyPoints Editing mode or not.


setOpaquePolyPointsEdition

public void setOpaquePolyPointsEdition(boolean set)
Sets the interactor in Opaque PolyPoints Editing mode. The interactor has two modes to edit polypoints objects: The Opaque PolyPoints Editing mode and the Ghost PolyPoints Editing mode. In Opaque PolyPoints Editing mode, the polypoints object that the user edits is changed for each drag event. In Ghost PolyPoints Editing mode, the polypoints object is changed only when the user releases the mouse button. The default mode is the Ghost PolyPoints Editing mode.


getMultipleSelectionModifier

public int getMultipleSelectionModifier()
Returns the multiple selection modifier. The default modifier is SHIFT.


setMultipleSelectionModifier

public void setMultipleSelectionModifier(int modifier)
Sets the multiple selection modifier. The default modifier is SHIFT.

Parameters:
modifier - 1 = SHIFT, 2 = CTRL

getSelectionModifier

public int getSelectionModifier()
Returns the selection modifier. The default modifier is CTRL.


setSelectionModifier

public void setSelectionModifier(int modifier)
Sets the selection modifier. This is used by the interactor to determine if a click corresponds to the start of the drag of a selection rectangle. If this modifier is not down, such a click over a graphic object produces the selection and/or move of the object instead. The default modifier is CTRL.

Parameters:
modifier - 1 = SHIFT, 2 = CTRL


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.   . All Rights Reserved.