ilog.cpl.equipment.action.toolbar
Class IlpEquipmentSelectButton

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.equipment.action.toolbar.IlpEquipmentInteractorButton
                              extended by ilog.cpl.equipment.action.toolbar.IlpEquipmentSelectButton
All Implemented Interfaces:
ImageObserver, ItemSelectable, MenuContainer, Serializable, Accessible, SwingConstants

public class IlpEquipmentSelectButton
extends IlpEquipmentInteractorButton

This button sets a selection interactor on the view.

Since:
JTGO 4.0
See Also:
IltSelectInteractor, IlpEquipmentSelectAction, IlpEquipmentInteractorButton, 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
IlpEquipmentSelectButton(IlpViewsView view)
          Creates the button.
 
Method Summary
 int getMoveThreshold()
          Returns the threshold from which the objects become movable.
 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 allows the end-user to edit objects.
 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 object is drawn while it is being moved.
 void setDragAllowed(boolean allow)
          Enables or disables the selection of objects by dragging a rectangle over them.
 void setEditingAllowed(boolean allow)
          Enables or disables the editing of 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)
          Sets the threshold from which the objects become movable.
 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 move mode.
 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)
          Enables or disables the drawing of the object while it is being 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

IlpEquipmentSelectButton

public IlpEquipmentSelectButton(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)
Enables or disables the selection of objects by dragging a rectangle over them.


isEditingAllowed

public boolean isEditingAllowed()
Returns true if the interactor allows the end-user to edit objects. Editing is handled by dispatching the events to the interactor that is attached to the selection object.


setEditingAllowed

public void setEditingAllowed(boolean allow)
Enables or disables the editing of objects with the interactor.


getMoveThreshold

public int getMoveThreshold()
Returns the threshold from which the objects become movable. A graphic object will only move if the distance covered by the mouse is bigger than that of the threshold. The threshold is in pixels and the default value is 2.


setMoveThreshold

public void setMoveThreshold(int threshold)
Sets the threshold from which the objects become movable. A graphic object will only move if the distance covered by the mouse is bigger than that of the threshold. The default value is 2.

Parameters:
threshold - The threshold, in pixels.

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:


setOpaqueMove

public void setOpaqueMove(boolean set)
Sets the move mode. The interactor has two modes to move a graphic object:


isShowingMovingObject

public boolean isShowingMovingObject()
Returns true if the object is drawn while it is being moved. Returns false if the bounding box rectangle is drawn instead.


setShowingMovingObject

public void setShowingMovingObject(boolean set)
Enables or disables the drawing of the object while it is being moved. When in Opaque Move mode, this property is ignored.

Parameters:
set - true to draw the object while it is being moved. false to draw the bounding box rectangle instead.

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.