com.sas.visuals
Class ArrowButton

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--com.sas.awt.ContainerVisualComponent
                    |
                    +--com.sas.awt.ContainerContainerComponent
                          |
                          +--com.sas.awt.Container
                                |
                                +--com.sas.visuals.CompositeContainer
                                      |
                                      +--com.sas.visuals.BaseButton
                                            |
                                            +--com.sas.visuals.PushButton
                                                  |
                                                  +--com.sas.visuals.ArrowButton
All Implemented Interfaces:
ActionSource, Alignment, ComponentInterface, CompositeInterface, ContainerInterface, DesignTimeDropTargetInterface, LinkPropertiesInterface, ModelInterface, MultipleValueEventSourceInterface, PrintableInterface, com.sas.beans.PropertyChangeSource, PublicClonable, ResizeToFitInterface, StringDataInterface, ValidatorInterface, VetoableChangeSource, ViewInterface, VisualInterface

public class ArrowButton
extends PushButton

ArrowButton is a subclass of PushButton that displays an ArrowIcon and uses an AlarmButtonModel. When the button is pressed an ActionEvent is fired until it is released or the mouse is dragged out of the bounds of the button.

See Also:
Serialized Form

Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Fields inherited from class com.sas.visuals.PushButton
contentShift, label, RB_KEY
 
Fields inherited from class com.sas.visuals.BaseButton
actionCommand, actionListenerList, borderPainted, BOTTOM, buttonListener, buttonModel, currentInsets, defaultIcon, disabledIcon, displayTransform, focusGap, focusPainted, gap, hasFocus, horizontalAlignment, horizontalTextAlignment, item, itemListenerList, LEFT, pressedIcon, resizeToFit, RIGHT, rolloverIcon, selectedIcon, text, textPosition, TOP, updateItem, updateText, verticalAlignment, verticalTextAlignment
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface com.sas.visuals.Alignment
BEGIN, CENTER, END
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
ArrowButton()
          Default constructor.
ArrowButton(int orientation)
          Constructor that sets the orientation of the arrow.
 
Method Summary
protected  void buttonModelArmed(ButtonModelInterface btnModel)
          Overridden to change the border style when the button is pressed and armed.
protected  void buttonModelDisabled(ButtonModelInterface btnModel)
          Overridden to change the foreground color when the button is disabled.
protected  void buttonModelPressed(ButtonModelInterface btnModel)
          Overridden to change the border style when the button is pressed and armed.
 Dimension getMinimumSize()
          Get the minimum size of the ArrowButton based on its contents.
 int getOrientation()
          Get the orientation of the ArrowIcon.
 void setBounds(int x, int y, int width, int height)
          Set the bounds of the ArrowButton.
 void setOrientation(int orientation)
          Set the orientation of the ArrowIcon.
 
Methods inherited from class com.sas.visuals.PushButton
clone, contentShift, getContentShift, getDefaultHeight, getDefaultWidth, getExtendedBeanInfo, getSource, paint, paintBackground, paintFocus, setContentShift, setDefaultHeight, setDefaultWidth, setFont, setHorizontalTextAlignment, setSource, setText, setVerticalTextAlignment
 
Methods inherited from class com.sas.visuals.BaseButton
actionPerformed, addActionListener, addItemListener, addNotify, buttonModelRollover, buttonModelSelected, computePreferredSize, detachModel, focusGained, focusLost, getActionCommand, getButtonListener, getButtonModel, getContentSize, getDefaultIcon, getDisabledIcon, getDisplayTransform, getFocusGap, getHorizontalAlignment, getHorizontalTextAlignment, getIconTextGap, getInsets, getItem, getKeyAccelerator, getPressedIcon, getRequiredInterfaces, getRolloverIcon, getSelectedIcon, getSelectedObjects, getText, getTextPosition, getVerticalAlignment, getVerticalTextAlignment, isBorderPainted, isFocusPainted, isFocusTraversable, isResizeToFit, isSelected, itemStateChanged, processActionEvent, processEvent, processItemEvent, propertyChange, refresh, refreshItem, removeActionListener, removeItemListener, resizeToFit, setActionCommand, setBorderPainted, setButtonListener, setButtonModel, setDefaultIcon, setDefaultValues, setDisabledIcon, setDisplayTransform, setEnabled, setFocusGap, setFocusPainted, setHorizontalAlignment, setIconTextGap, setInsets, setItem, setKeyAccelerator, setPressedIcon, setResizeToFit, setRolloverIcon, setSelected, setSelectedIcon, setTextPosition, setVerticalAlignment
 
Methods inherited from class com.sas.awt.ContainerContainerComponent
dragEnter, dragLeave, dragOver, drop, getContainerInterfaceSupportInfo, getErrorHandler, getValidator, isIDEDnDDropBarrier, isIDEDnDDropTarget, isValid, removeNotify, setContainerInterfaceSupportInfo, setErrorHandler, setIDEDnDDropBarrier, setIDEDnDDropTarget, setInsets, setValidator, superAddNotify, superGetInsets, superRemoveNotify, superSetDefaultValues
 
Methods inherited from class com.sas.awt.ContainerVisualComponent
addLink, addPropertyChangeListener, addVetoableChangeListener, anyPropertyChangeListeners, attachModel, attachView, detachView, dumpComponent, firePropertyChange, firePropertyChange, fireVetoableChange, getBackgroundColor, getBorder, getComponentDescription, getComponentSupportInfo, getEventMethod, getEventValues, getFont, getForegroundColor, getHeight, getHorizontalPosition, getLinkInfo, getModelInterface, getPageBounds, getPreferredSize, getPrePainter, getPrintOptionsPanel, getVerticalPosition, getViewInterfaceSupportInfo, getVisualInterfaceSupportInfo, getWidth, initialize, initializeComponent, isDesignTime, isEnabled, isFocus, isLinked, isTransparent, isVisible, pageExists, print, printFinalize, printInitialize, queryLinks, queryLinks, removeAllLinks, removeInterfaceTraps, removeLink, removePropertyChangeListener, removeVetoableChangeListener, setBackgroundColor, setBorder, setComponentDescription, setComponentSupportInfo, setFocus, setForegroundColor, setHeight, setHorizontalPosition, setLinkInfo, setModelInterface, setPreferredSize, setPrePainter, setRequiredInterfaces, setTransparent, setVerticalPosition, setViewInterfaceSupportInfo, setVisible, setVisualInterfaceSupportInfo, setWidth, superGetFont, superGetMinimumSize, superGetPreferredSize, superIsEnabled, superIsVisible, superPaint, superSetBounds, superSetEnabled, superSetFont, superSetVisible, superUpdate, supportsListenerInterface, supportsRequiredInterfaces, trapInterfaceEvents, update, validateObject
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getListeners, getMaximumSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, getAccessibleContext, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isFocusable, isFocusOwner, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.sas.awt.ContainerInterface
getComponents, getLayout, invalidate, setLayout, validate
 
Methods inherited from interface com.sas.awt.VisualInterface
getBackgroundColor, getBorder, getFont, getForegroundColor, getHeight, getHorizontalPosition, getPreferredSize, getPrePainter, getVerticalPosition, getVisualInterfaceSupportInfo, getWidth, isEnabled, isFocus, isTransparent, isVisible, setBackgroundColor, setBorder, setFocus, setForegroundColor, setHeight, setHorizontalPosition, setPreferredSize, setPrePainter, setTransparent, setVerticalPosition, setVisible, setVisualInterfaceSupportInfo, setWidth, superGetFont, superGetMinimumSize, superGetPreferredSize, superIsEnabled, superIsVisible, superPaint, superSetBounds, superSetEnabled, superSetFont, superSetVisible, superUpdate
 

Constructor Detail

ArrowButton

public ArrowButton()
Default constructor. The arrow orientation is set to TOP by default.

ArrowButton

public ArrowButton(int orientation)
Constructor that sets the orientation of the arrow.
Parameters:
orientation - ArrowIcon orientation
Method Detail

getOrientation

public int getOrientation()
Get the orientation of the ArrowIcon.
Returns:
the arrowIcon can have an orientation of TOP, BOTTOM, LEFT, or RIGHT.
See Also:
Orientations

setOrientation

public void setOrientation(int orientation)
Set the orientation of the ArrowIcon.
Parameters:
orientation - the orientation of the arrowIcon; an Orientations value of TOP, BOTTOM, LEFT, or RIGHT.
See Also:
Orientations

buttonModelArmed

protected void buttonModelArmed(ButtonModelInterface btnModel)
Overridden to change the border style when the button is pressed and armed.
Overrides:
buttonModelArmed in class PushButton
Parameters:
btnModel - the current state of the button

buttonModelPressed

protected void buttonModelPressed(ButtonModelInterface btnModel)
Overridden to change the border style when the button is pressed and armed.
Overrides:
buttonModelPressed in class PushButton
Parameters:
btnModel - the current state of the button

buttonModelDisabled

protected void buttonModelDisabled(ButtonModelInterface btnModel)
Overridden to change the foreground color when the button is disabled.
Overrides:
buttonModelDisabled in class BaseButton
Parameters:
btnModel - the current state of the button

getMinimumSize

public Dimension getMinimumSize()
Get the minimum size of the ArrowButton based on its contents.
Overrides:
getMinimumSize in class PushButton
Returns:
the minimum size of the ArrowButton

setBounds

public void setBounds(int x,
                      int y,
                      int width,
                      int height)
Set the bounds of the ArrowButton. This also changes the displayed size of the ArrowIcon if the new size is smaller than the current size.
Overrides:
setBounds in class BaseButton
Parameters:
x - the new x position
y - the new y position
width - the new width
height - the new height




Copyright © 2005 SAS Institute Inc. All Rights Reserved.
javadoc generated Thu, 16 Feb 2006 02:32:36