|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JPanel com.jidesoft.swing.NullPanel com.jidesoft.status.StatusBarItem com.jidesoft.status.ButtonStatusBarItem
public class ButtonStatusBarItem
A status bar item with a button.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
JPanel.AccessibleJPanel |
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 |
---|
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 | |
---|---|
ButtonStatusBarItem()
|
|
ButtonStatusBarItem(Action action)
Creates a ButtonStatusBarItem with the Action set to the button. |
|
ButtonStatusBarItem(String name)
Creates a button status bar item with name. |
Method Summary | ||
---|---|---|
void |
addActionListener(ActionListener listener)
Adds an ActionListener to the button. |
|
protected AbstractButton |
createButton()
Creates button used by this ButtonStatusBarItem. |
|
protected void |
customizeButton(AbstractButton button)
Customize the button. |
|
void |
doClick()
|
|
void |
doClick(int pressTime)
|
|
Component |
getComponent()
Gets the actual component. |
|
int |
getHorizontalAlignment()
Gets the text horizontal alignment. |
|
String |
getItemName()
Gets item name. |
|
|
getListeners(Class<T> listenerType)
|
|
Dimension |
getPreferredSize()
If the preferredSize has been set to a non-null value just returns it. |
|
String |
getToolTipText()
|
|
void |
removeActionListener(ActionListener listener)
Removes the ActionListener from the button. |
|
void |
setEnabled(boolean enabled)
Enable or disable the StatusBar Item. |
|
void |
setHorizontalAlignment(int alignment)
Sets the text horizontal alignment. |
|
void |
setIcon(Icon icon)
Sets icon to be displayed on the button. |
|
void |
setText(String text)
Sets text to be displayed on the button. |
|
void |
setToolTip(String tooltip)
Sets tooltip to be displayed on the button. |
|
void |
setToolTipText(String text)
|
|
void |
updateUI()
Resets the UI property with a value from the current look and feel. |
Methods inherited from class com.jidesoft.status.StatusBarItem |
---|
getPreferredWidth, setPreferredWidth |
Methods inherited from class com.jidesoft.swing.NullPanel |
---|
setBackground, setFont, setForeground |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ButtonStatusBarItem()
public ButtonStatusBarItem(String name)
name
- name of the status bar itempublic ButtonStatusBarItem(Action action)
ButtonStatusBarItem
with the Action set to the button.
action
- the action on the button.Method Detail |
---|
protected void customizeButton(AbstractButton button)
button
- the buttonpublic void setToolTipText(String text)
setToolTipText
in class JComponent
public String getToolTipText()
getToolTipText
in class JComponent
protected AbstractButton createButton()
public void setText(String text)
text
- the new text on the button.public void setToolTip(String tooltip)
tooltip
- the new tooltip on the button.public void setIcon(Icon icon)
icon
- the new icon on the button.public void setEnabled(boolean enabled)
setEnabled
in class JComponent
enabled
- true to enable the button and false to disable it.public void addActionListener(ActionListener listener)
ActionListener
to the button.
listener
- the ActionListener
to be addedpublic void removeActionListener(ActionListener listener)
ActionListener
from the button.
listener
- the ActionListener
to be removedpublic <T extends EventListener> T[] getListeners(Class<T> listenerType)
getListeners
in class JComponent
public Component getComponent()
public Dimension getPreferredSize()
preferredSize
has been set to a non-null
value just returns it. If the UI
delegate's getPreferredSize
method returns a non null
value then return that; otherwise
defer to the component's layout manager.
getPreferredSize
in class StatusBarItem
preferredSize
propertyJComponent.setPreferredSize(java.awt.Dimension)
,
ComponentUI
public String getItemName()
StatusBarItem
getItemName
in class StatusBarItem
public void updateUI()
StatusBarItem
updateUI
in class StatusBarItem
JComponent.updateUI()
public void doClick()
public void doClick(int pressTime)
public void setHorizontalAlignment(int alignment)
AbstractButton.setHorizontalAlignment(int)
.
alignment
- the horizontal alignment of the button.getHorizontalAlignment()
public int getHorizontalAlignment()
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |