|
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Canvas | +--vipratech.awt.VCanvas | +--vipratech.beans.standardbeans.MainButton
The MainButton class displays a flat button that responds to mouse over and mouse pressed events by changing its 3D appearance.
Icons can be added from vipratech.awt.ButtonIcon that also respond to these events.
The button can be wired to vipratech.beans.LanguageChoice at design time to display a locale senstive label.
By setting the boolean clickable variable to true, the button becomes toggled so that it stays recessed when clicked once and then snaps back to its normal enabled appearance after a second mouse release.
On mouse release the button generates an action event object which is sent to any registered action listeners.
MainButtonIcon
, Serialized FormFields inherited from class vipratech.awt.VCanvas |
fm |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
LEFT_ALIGNMENT,
RIGHT_ALIGNMENT,
TOP_ALIGNMENT |
Constructor Summary | |
MainButton()
Constructor. |
Method Summary | |
void |
addActionListener(java.awt.event.ActionListener listener)
Allows this component to be wired at design time with action listeners |
boolean |
getClickable()
Returns the boolean state of the clickable variable. |
boolean |
getClickedOnce()
Returns true if the button has been set to clickable and the button is in the recessed clicked once position. |
boolean |
getEnabled()
Returns the enabled state of the button. |
int |
getIcon()
Gets the int constant resprenting the icon. |
java.lang.String |
getKey()
Returns the key for the button. |
java.lang.String |
getLabel()
Returns the string representing the label. |
java.util.Locale |
getLocale()
Returns the locale for this component. |
java.awt.Dimension |
getMinimumSize()
Returns the minimum size of this component of width 56px, height 36px. |
java.awt.Dimension |
getPreferredSize()
Returns the preferred size of this component of width 56px, height 36px. |
void |
paint(java.awt.Graphics g)
Draws the complete button, border and icon depending on the current mouse event. |
void |
propertyChange(java.beans.PropertyChangeEvent event)
Allows this component to be wired up to vipratech.beans.LanguageChoice at design time. |
void |
removeActionListener(java.awt.event.ActionListener listener)
Allows this component to be un-wired at design time with action listeners |
void |
setClickable(boolean clickable)
Allows the button to be set to clickable. |
void |
setEnabled(boolean enabled)
Allows the button to be disabled. |
void |
setIcon(int icon)
Sets the icon for the button using an int constant from vipratech.awt.ButtonIcon. |
void |
setKey(java.lang.String key)
Sets a key for the button. |
void |
setLabel(java.lang.String label)
Sets the label for the button. |
void |
setLocale(java.util.Locale locale)
Sets the locale for this component. |
Methods inherited from class java.awt.Canvas |
addNotify |
Methods inherited from class java.awt.Component |
action,
add,
addComponentListener,
addFocusListener,
addInputMethodListener,
addKeyListener,
addMouseListener,
addMouseMotionListener,
addPropertyChangeListener,
addPropertyChangeListener,
bounds,
checkImage,
checkImage,
contains,
contains,
createImage,
createImage,
deliverEvent,
disable,
dispatchEvent,
doLayout,
enable,
enable,
enableInputMethods,
getAlignmentX,
getAlignmentY,
getBackground,
getBounds,
getBounds,
getColorModel,
getComponentAt,
getComponentAt,
getComponentOrientation,
getCursor,
getDropTarget,
getFont,
getFontMetrics,
getForeground,
getGraphics,
getHeight,
getInputContext,
getInputMethodRequests,
getLocation,
getLocation,
getLocationOnScreen,
getMaximumSize,
getName,
getParent,
getPeer,
getSize,
getSize,
getToolkit,
getTreeLock,
getWidth,
getX,
getY,
gotFocus,
handleEvent,
hasFocus,
hide,
imageUpdate,
inside,
invalidate,
isDisplayable,
isDoubleBuffered,
isEnabled,
isFocusTraversable,
isLightweight,
isOpaque,
isShowing,
isValid,
isVisible,
keyDown,
keyUp,
layout,
list,
list,
list,
list,
list,
locate,
location,
lostFocus,
minimumSize,
mouseDown,
mouseDrag,
mouseEnter,
mouseExit,
mouseMove,
mouseUp,
move,
nextFocus,
paintAll,
postEvent,
preferredSize,
prepareImage,
prepareImage,
print,
printAll,
remove,
removeComponentListener,
removeFocusListener,
removeInputMethodListener,
removeKeyListener,
removeMouseListener,
removeMouseMotionListener,
removeNotify,
removePropertyChangeListener,
removePropertyChangeListener,
repaint,
repaint,
repaint,
repaint,
requestFocus,
reshape,
resize,
resize,
setBackground,
setBounds,
setBounds,
setComponentOrientation,
setCursor,
setDropTarget,
setFont,
setForeground,
setLocation,
setLocation,
setName,
setSize,
setSize,
setVisible,
show,
show,
size,
toString,
transferFocus,
update,
validate |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public MainButton()
Method Detail |
public void addActionListener(java.awt.event.ActionListener listener)
public void removeActionListener(java.awt.event.ActionListener listener)
public void propertyChange(java.beans.PropertyChangeEvent event)
public final void paint(java.awt.Graphics g)
public final java.awt.Dimension getMinimumSize()
public final java.awt.Dimension getPreferredSize()
public final void setEnabled(boolean enabled)
public final boolean getEnabled()
public final void setClickable(boolean clickable)
public final boolean getClickable()
public final boolean getClickedOnce()
public final void setIcon(int icon)
public final int getIcon()
public final void setLabel(java.lang.String label)
public final java.lang.String getLabel()
public final void setKey(java.lang.String key)
public final java.lang.String getKey()
public final void setLocale(java.util.Locale locale)
public final java.util.Locale getLocale()
|
dathe@chemie.uni-leipzig.de" | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |