org.objectweb.fractal.gui.graph.view
Class BasicToolView
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.AbstractButton
javax.swing.JToggleButton
org.objectweb.fractal.gui.graph.view.BasicToolView
- All Implemented Interfaces:
- Accessible, Action, org.objectweb.fractal.swing.ActionAttributes, ActionListener, AttributeController, BindingController, EventListener, ImageObserver, ItemSelectable, MenuContainer, Serializable, SwingConstants, ToolsListener
- public class BasicToolView
- extends JToggleButton
- implements Action, ToolsListener, BindingController, org.objectweb.fractal.swing.ActionAttributes
A tools
view component. This component displays one tool, as
a toggle button which is selected iif the corresponding tool is selected in
the model. This view component listens to the tools model, in order to select
or deselect itself when the currently selected tool changes.
- See Also:
- Serialized Form
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 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 |
Methods inherited from class javax.swing.AbstractButton |
addActionListener, addChangeListener, addItemListener, checkHorizontalKey, checkVerticalKey, configurePropertiesFromAction, createActionListener, createActionPropertyChangeListener, createChangeListener, createItemListener, doClick, doClick, fireActionPerformed, fireItemStateChanged, 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, setMargin, setMnemonic, setMnemonic, setModel, setMultiClickThreshhold, setPressedIcon, setRolloverEnabled, setRolloverIcon, setRolloverSelectedIcon, setSelected, setSelectedIcon, setText, setUI, setVerticalAlignment, setVerticalTextPosition |
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, getInsets, getInsets, 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, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, 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, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from interface org.objectweb.fractal.swing.ActionAttributes |
getName, getToolTipText, setToolTipText |
TOOLS_BINDING
public static final String TOOLS_BINDING
- A mandatory client interface bound to a
tools
model. This
is the model displayed by this view component.
- See Also:
- Constant Field Values
BasicToolView
public BasicToolView()
- Constructs a new
BasicToolView
component.
listFc
public String[] listFc()
- Description copied from interface:
BindingController
- Returns the names of the client interfaces of the component to which this
interface belongs.
- Specified by:
listFc
in interface BindingController
- Returns:
- the names of the client interfaces of the component to which this
interface belongs.
lookupFc
public Object lookupFc(String clientItfName)
- Description copied from interface:
BindingController
- Returns the interface to which the given client interface is bound. More
precisely, returns the server interface to which the client interface whose
name is given is bound. This server interface is necessarily in the same
address space as the client interface (see
bindFc
).
- Specified by:
lookupFc
in interface BindingController
- Parameters:
clientItfName
- the name of a client interface of the component to
which this interface belongs.
- Returns:
- the server interface to which the given interface is bound, or
null if it is not bound.
bindFc
public void bindFc(String clientItfName,
Object serverItf)
- Description copied from interface:
BindingController
- Binds the client interface whose name is given to a server interface. More
precisely, binds the client interface of the component to which this
interface belongs, and whose name is equal to the given name, to the given
server interface. The given server interface must be in the same address
space as the client interface.
- Specified by:
bindFc
in interface BindingController
- Parameters:
clientItfName
- the name of a client interface of the component to
which this interface belongs.serverItf
- a server interface.
unbindFc
public void unbindFc(String clientItfName)
- Description copied from interface:
BindingController
- Unbinds the given client interface. More precisely, unbinds the client
interface of the component to which this interface belongs, and whose name
is equal to the given name.
- Specified by:
unbindFc
in interface BindingController
- Parameters:
clientItfName
- the name of a client interface of the component to
which this interface belongs.
getValue
public Object getValue(String key)
- Specified by:
getValue
in interface Action
putValue
public void putValue(String key,
Object value)
- Specified by:
putValue
in interface Action
actionPerformed
public void actionPerformed(ActionEvent e)
- Specified by:
actionPerformed
in interface ActionListener
setName
public void setName(String name)
- Specified by:
setName
in interface org.objectweb.fractal.swing.ActionAttributes
getIconURL
public String getIconURL()
- Specified by:
getIconURL
in interface org.objectweb.fractal.swing.ActionAttributes
setIconURL
public void setIconURL(String iconURL)
- Specified by:
setIconURL
in interface org.objectweb.fractal.swing.ActionAttributes
getAcceleratorKey
public String getAcceleratorKey()
- Specified by:
getAcceleratorKey
in interface org.objectweb.fractal.swing.ActionAttributes
setAcceleratorKey
public void setAcceleratorKey(String acceleratorKey)
- Specified by:
setAcceleratorKey
in interface org.objectweb.fractal.swing.ActionAttributes
toolChanged
public void toolChanged()
- Description copied from interface:
ToolsListener
- Notifies this listener that the currently selected tool has changed.
- Specified by:
toolChanged
in interface ToolsListener
fireStateChanged
protected void fireStateChanged()