|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
org.pushingpixels.flamingo.api.common.JCommandButtonStrip
public class JCommandButtonStrip
Button strip component. Provides visual appearance of a strip. The buttons in the strip are either drawn horizontally with no horizontal space between them or drawn vertically with no vertical space between them.
Nested Class Summary | |
---|---|
static class |
JCommandButtonStrip.StripOrientation
Button strip orientation. |
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.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected CommandButtonDisplayState |
displayState
Element state for the buttons in this button strip. |
protected double |
hgapScaleFactor
Scale factor for horizontal gaps. |
static String |
uiClassID
The UI class ID string. |
protected double |
vgapScaleFactor
Scale factor for vertical gaps. |
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 java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
JCommandButtonStrip()
Creates an empty horizontally-oriented strip. |
|
JCommandButtonStrip(JCommandButtonStrip.StripOrientation orientation)
Creates an empty strip. |
Method Summary | |
---|---|
Component |
add(Component comp)
|
Component |
add(Component comp,
int index)
|
void |
add(Component comp,
Object constraints)
|
void |
add(Component comp,
Object constraints,
int index)
|
Component |
add(String name,
Component comp)
|
void |
addChangeListener(ChangeListener l)
Adds the specified change listener to track changes to this command button strip. |
protected void |
fireStateChanged()
Notifies all registered listener that the state of this command button strip has changed. |
AbstractCommandButton |
getButton(int index)
Returns the specified button component of this strip. |
int |
getButtonCount()
Returns the number of buttons in this strip. |
JCommandButtonStrip.StripOrientation |
getOrientation()
Returns the orientation of this strip. |
CommandButtonStripUI |
getUI()
Returns the UI object which implements the L&F for this component. |
String |
getUIClassID()
Returns the name of the UI class that implements the L&F for this component. |
boolean |
isFirst(AbstractCommandButton button)
Checks whether the specified button is the first button in this strip. |
boolean |
isLast(AbstractCommandButton button)
Checks whether the specified button is the last button in this strip. |
void |
removeChangeListener(ChangeListener l)
Removes the specified change listener from tracking changes to this command button strip. |
void |
setDisplayState(CommandButtonDisplayState elementState)
Sets the display state for the buttons in this button strip. |
void |
setHGapScaleFactor(double hgapScaleFactor)
Sets the horizontal gap scale factor for the buttons in this button strip. |
void |
setUI(CommandButtonStripUI ui)
Sets the new UI delegate. |
void |
setVGapScaleFactor(double vgapScaleFactor)
Sets the vertical gap scale factor for the buttons in this button strip. |
void |
updateUI()
Resets the UI property to a value from the current look and feel. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String uiClassID
protected CommandButtonDisplayState displayState
CommandButtonDisplayState.SMALL
.
protected double hgapScaleFactor
setVGapScaleFactor(double)
protected double vgapScaleFactor
setVGapScaleFactor(double)
Constructor Detail |
---|
public JCommandButtonStrip()
public JCommandButtonStrip(JCommandButtonStrip.StripOrientation orientation)
orientation
- Orientation for this strip.Method Detail |
---|
public void setDisplayState(CommandButtonDisplayState elementState)
CommandButtonDisplayState.SMALL
.
elementState
- New element state for the buttons in this button strip.public void setHGapScaleFactor(double hgapScaleFactor)
The default horizontal gap scale factor for horizontally oriented strips is 0.75. The default horizontal gap scale factor for vertically oriented strips is 1.0.
hgapScaleFactor
- New horizontal gap scale factor for the buttons in this button
strip.setVGapScaleFactor(double)
public void setVGapScaleFactor(double vgapScaleFactor)
The default vertical gap scale factor for vertically oriented strips is 0.75. The default vertical gap scale factor for horizontally oriented strips is 1.0.
vgapScaleFactor
- New vertical gap scale factor for the buttons in this button
strip.setHGapScaleFactor(double)
public void add(Component comp, Object constraints, int index)
add
in class Container
public void add(Component comp, Object constraints)
add
in class Container
public Component add(Component comp, int index)
add
in class Container
public Component add(Component comp)
add
in class Container
public Component add(String name, Component comp)
add
in class Container
public void setUI(CommandButtonStripUI ui)
ui
- New UI delegate.public void updateUI()
updateUI
in class JComponent
JComponent.updateUI()
public CommandButtonStripUI getUI()
ButtonStripUI
objectsetUI(org.pushingpixels.flamingo.internal.ui.common.CommandButtonStripUI)
public String getUIClassID()
getUIClassID
in class JComponent
JComponent.getUIClassID()
,
UIDefaults.getUI(javax.swing.JComponent)
public int getButtonCount()
this
strip.
this
strip.getButton(int)
public AbstractCommandButton getButton(int index)
this
strip.
index
- Button index.
getButtonCount()
public boolean isFirst(AbstractCommandButton button)
this
strip.
button
- Button to check.
true
if the specified button is the first button in
this
strip, false
otherwise.isLast(AbstractCommandButton)
public boolean isLast(AbstractCommandButton button)
this
strip.
button
- Button to check.
true
if the specified button is the last button in
this
strip, false
otherwise.isFirst(AbstractCommandButton)
public JCommandButtonStrip.StripOrientation getOrientation()
this
strip.
this
strip.public void addChangeListener(ChangeListener l)
l
- Change listener to add.removeChangeListener(ChangeListener)
public void removeChangeListener(ChangeListener l)
l
- Change listener to remove.addChangeListener(ChangeListener)
protected void fireStateChanged()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |