|
JIDE 3.5.15 | ||||||||
| 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
javax.swing.AbstractButton
javax.swing.JMenuItem
javax.swing.JMenu
com.jidesoft.swing.JideMenu
com.jidesoft.swing.JideSplitButton
public class JideSplitButton
JideSplitButton is a combination of button and menu. There is a line in the middle of the button that
splits the button into two portions. The portion before the line is a button. User can click on it and trigger an
action. The portion after the line is a menu. User can click on it to show a normal menu.
splitButton.setFont((Font) JideSwingUtilities.getMenuFont(Toolkit.getDefaultToolkit(), UIManager.getDefaults()));
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.jidesoft.swing.JideMenu |
|---|
JideMenu.MenuCreator, JideMenu.PopupMenuCustomizer, JideMenu.PopupMenuOriginCalculator |
| Nested classes/interfaces inherited from class javax.swing.JMenu |
|---|
JMenu.AccessibleJMenu, JMenu.WinListener |
| Nested classes/interfaces inherited from class javax.swing.JMenuItem |
|---|
JMenuItem.AccessibleJMenuItem |
| Nested classes/interfaces inherited from class javax.swing.AbstractButton |
|---|
AbstractButton.AccessibleAbstractButton, AbstractButton.ButtonChangeListener |
| 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 | |
|---|---|
static String |
ACTION_PROPERTY_SPLIT_BUTTON_ENABLED
|
static String |
PROPERTY_ALWAYS_DROPDOWN
|
| Fields inherited from class com.jidesoft.swing.JideMenu |
|---|
DELAY |
| Fields inherited from class javax.swing.JMenu |
|---|
popupListener |
| 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 com.jidesoft.swing.ButtonStyle |
|---|
BUTTON_STYLE_PROPERTY, CLIENT_PROPERTY_SEGMENT_POSITION, FLAT_STYLE, HYPERLINK_STYLE, SEGMENT_POSITION_FIRST, SEGMENT_POSITION_LAST, SEGMENT_POSITION_MIDDLE, SEGMENT_POSITION_ONLY, TOOLBAR_STYLE, TOOLBOX_STYLE |
| Fields inherited from interface com.jidesoft.swing.Alignable |
|---|
PROPERTY_ORIENTATION |
| Fields inherited from interface javax.swing.SwingConstants |
|---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
JideSplitButton()
|
|
JideSplitButton(Action a)
|
|
JideSplitButton(Icon icon)
|
|
JideSplitButton(String s)
|
|
JideSplitButton(String s,
Icon icon)
|
|
| Method Summary | |
|---|---|
protected void |
actionPropertyChanged(Action action,
String propertyName)
|
protected void |
configurePropertiesFromAction(Action action)
|
void |
doClick()
Clicks on the button part of the JideSplitButton. |
void |
doClickOnMenu()
Clicks on the drop down menu part of the JideSplitButton. |
Color |
getBackgroundOfState(int state)
Gets the background for different states. |
int |
getButtonStyle()
Gets the button style. |
Color |
getDefaultForeground()
|
Color |
getForegroundOfState(int state)
Gets the foreground for different states. |
ButtonUI |
getUI()
Returns the split button 's current UI. |
String |
getUIClassID()
Returns the name of the L&F class that renders this component. |
protected void |
initComponent()
|
boolean |
isAlwaysDropdown()
Checks the alwaysDropdown property value. |
boolean |
isButtonEnabled()
Returns the state of the button part of the JideSplitButton. |
boolean |
isButtonSelected()
Returns the state of the button part of the JideSplitButton. |
static boolean |
isSplitButtonEnabled(Action action)
Get if the split button is enable from the property stored inside the action. |
void |
setAlwaysDropdown(boolean alwaysDropdown)
If the property is true, the split button doesn't have default action. |
void |
setBackgroundOfState(int state,
Color color)
Sets the background for different states. |
void |
setButtonEnabled(boolean b)
Sets the state of the button part of the JideSplitButton. |
void |
setButtonSelected(boolean b)
Sets the state of the button part of the JideSplitButton. |
void |
setButtonStyle(int buttonStyle)
Sets the button style. |
void |
setDefaultForeground(Color defaultForeground)
|
void |
setForegroundOfState(int state,
Color color)
Sets the foreground for different states. |
protected void |
setIconFromAction(Action action)
By default, we will use large icon instead of small icon in the JMenuItem. |
void |
setText(String text)
|
void |
setUI(ButtonUI ui)
Sets the L&F object that renders this component. |
void |
updateUI()
Notification from the UIFactory that the L&F has changed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface javax.swing.MenuElement |
|---|
processKeyEvent, processMouseEvent |
| Field Detail |
|---|
public static final String PROPERTY_ALWAYS_DROPDOWN
public static final String ACTION_PROPERTY_SPLIT_BUTTON_ENABLED
| Constructor Detail |
|---|
public JideSplitButton()
public JideSplitButton(String s)
public JideSplitButton(String s,
Icon icon)
public JideSplitButton(Icon icon)
public JideSplitButton(Action a)
| Method Detail |
|---|
protected void initComponent()
public ButtonUI getUI()
getUI in class AbstractButtonsetUI(javax.swing.plaf.ButtonUI)public void setUI(ButtonUI ui)
setUI in class AbstractButtonui - the JideSplitButtonUI L&F objectUIDefaults.getUI(javax.swing.JComponent)public void updateUI()
UIFactory that the L&F has changed. Called to replace the UI with the latest
version from the UIFactory.
updateUI in class JMenuJComponent.updateUI()public String getUIClassID()
getUIClassID in class JMenuJComponent.getUIClassID(),
UIDefaults.getUI(javax.swing.JComponent)public boolean isButtonSelected()
public void setButtonSelected(boolean b)
actionEvent. Call doClick to perform a programmatic action change.
b - true if the button is selected, otherwise falsepublic boolean isButtonEnabled()
public void setButtonEnabled(boolean b)
b - true if the button is enabled, otherwise falsepublic int getButtonStyle()
getButtonStyle in interface ButtonStylepublic void setButtonStyle(int buttonStyle)
setButtonStyle in interface ButtonStylebuttonStyle - the new button style.public boolean isAlwaysDropdown()
public void setAlwaysDropdown(boolean alwaysDropdown)
alwaysDropdown - true or false.public void setText(String text)
setText in class AbstractButtonpublic Color getDefaultForeground()
public void setDefaultForeground(Color defaultForeground)
public Color getBackgroundOfState(int state)
getBackgroundOfState in interface ComponentStateSupportstate - the button state. Please refer to ThemePainter to see the list of
available states.
public void setBackgroundOfState(int state,
Color color)
setBackgroundOfState in interface ComponentStateSupportstate - the button state. Please refer to ThemePainter to see the list of
available states.color - the background colorpublic Color getForegroundOfState(int state)
getForegroundOfState in interface ComponentStateSupportstate - the button state. Please refer to ThemePainter to see the list of
available states.
public void setForegroundOfState(int state,
Color color)
setForegroundOfState in interface ComponentStateSupportstate - the button state. Please refer to ThemePainter to see the list of
available states.color - the background colorpublic void doClick()
JideSplitButton.
doClick in class AbstractButtonpublic void doClickOnMenu()
JideSplitButton.
protected void configurePropertiesFromAction(Action action)
configurePropertiesFromAction in class JMenuItemprotected void setIconFromAction(Action action)
action - the action.
protected void actionPropertyChanged(Action action,
String propertyName)
actionPropertyChanged in class JMenuItempublic static boolean isSplitButtonEnabled(Action action)
action - the action
|
JIDE 3.5.15 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||