Advanced   Java   Services AbstractButton Back Next Up Home


Die AbstractButton-Hierarchie
AbstractButtonHier2.jpg


Grundlegende Eigenschaften
Einige Methoden
ReturntypName der Methode
EventHandling
void
 
addActionListener(ActionListener l)
Adds an ActionListener to the button.
void
 
removeActionListener(ActionListener l)
Removes an ActionListener from the button.
void
 
addChangeListener(ChangeListener l)
Adds a ChangeListener to the button.
void
 
removeChangeListener(ChangeListener l)
Removes a ChangeListener from the button.
void
 
addItemListener(ItemListener l)
Adds a ItemListener to the button (checkbox).
void
 
removeItemListener(ItemListener l)
Removes a ItemListener from the button (checkbox).
Setzten von Icons
Icon
 
getDisabledIcon()
Returns the icon used by the button when it's disabled.
void
 
setDisabledIcon(Icon icon)
Set the icon to be displayed if this Button is "disabled".
Icon
 
getDisabledSelectedIcon()
Returns the icon used by the button when it's disabled and selected.
void
 
setDisabledSelectedIcon(Icon icon)
Sets the disabled selection icon for the button.
Icon
 
getIcon()
Returns the default icon.
void
 
setIcon(Icon icon)
Defines the icon this component will display.
Icon
 
getPressedIcon()
Returns the pressed icon for the button.
void
 
setPressedIcon(Icon icon)
Sets the pressed icon for the button.
Icon
 
getRolloverIcon()
Returns the rollover icon for the button.
void
 
setRolloverIcon(Icon icon)
Sets the rollover icon for the button.
Icon
 
getRolloverSelectedIcon()
Returns the rollover selection icon for the button.
void
 
setRolloverSelectedIcon(Icon icon)
Sets the rollover selected icon for the button.
Icon
 
getSelectedIcon()
Returns the selected icon for the button.
void
 
setSelectedIcon(Icon icon)
Sets the selected icon for the button.
Positionierung und Text
int
 
getHorizontalAlignment()
Returns the alignment of the label's contents along the X axis.
void
 
setHorizontalAlignment(int alignment)
Sets the alignment of the label's contents along the X axis.
int
 
getVerticalAlignment()
Returns the alignment of the label's contents along the Y axis.
void
 
setVerticalAlignment(int alignment)
Sets the alignment of the label's contents along the Y axis.
int
 
getHorizontalTextPosition()
Returns the horizontal position of the label's text, relative to its image.
void
 
setHorizontalTextPosition(int textPosition)
Sets the horizontal position of the label's text, relative to its image.
int
 
getVerticalTextPosition()
Returns the vertical position of the label's text, relative to its image.
void
 
setVerticalTextPosition(int textPosition)
Sets the vertical position of the label's text, relative to its image.
String
 
getText()
Returns the text string that the label displays.
void
 
setText(String text)
Defines the single line of text this component will display.
Weitere Methoden
void
 
doClick()
Programmatically perform a "click".
boolean
 
isBorderPainted()
Gets the borderPainted property.
void
 
setBorderPainted(boolean b)
Sets the borderPainted property.
boolean
 
isContentAreaFilled()
Gets the contentAreaFilled property.
void
 
setContentAreaFilled(boolean b)
Sets the contentAreaFilled property.
boolean
 
isFocusPainted()
Gets the paintFocus property.
void
 
setFocusPainted(boolean b)
Sets the paintFocus property, which must be true for the focus state to be painted.
boolean
 
isRolloverEnabled()
Gets the rolloverEnabled property.
void
 
setRolloverEnabled(boolean b)
Sets the rolloverEnabled property, which must be true for rollover effects to occur.
boolean
 
isSelected()
Returns the state of the button.
void
 
setSelected(boolean b)
Sets the state of the button.

Valid XHTML 1.0 Strict top Back Next Up Home