|
|||||||||
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.internal.ui.ribbon.JRibbonGallery
public class JRibbonGallery
In-ribbon gallery. This class is for internal use only and should not be directly used by the applications.
JRibbonBand.addRibbonGallery(String, List, Map, int, int,
RibbonElementPriority)
,
Serialized FormNested Class Summary |
---|
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 List<StringValuePair<List<JCommandToggleButton>>> |
buttonGroups
Gallery button groups. |
protected List<JCommandToggleButton> |
buttons
The buttons of this gallery. |
protected CommandToggleButtonGroup |
buttonSelectionGroup
Button group for ensuring that only one button is selected. |
protected ActionListener |
dismissActionListener
Action listener wired to all the buttons in this gallery. |
protected RibbonElementPriority |
displayPriority
The current display priority of this in-ribbon gallery. |
protected boolean |
isShowingPopupPanel
Indication whether the ribbon gallery is showing the popup panel. |
protected JRibbonBand.RibbonGalleryPopupCallback |
popupCallback
|
protected int |
preferredPopupMaxButtonColumns
Preferred maximum number of button columns for the popup panel. |
protected int |
preferredPopupMaxVisibleButtonRows
Preferred maximum number of visible button rows for the popup panel. |
protected Map<RibbonElementPriority,Integer> |
preferredVisibleIconCount
Preferred widths for each possible display state (set in the user code according to design preferences). |
static String |
uiClassID
The UI class ID string. |
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 | |
---|---|
JRibbonGallery()
Creates new in-ribbon gallery. |
Method Summary | |
---|---|
void |
addRibbonGalleryButtons(String buttonGroupName,
JCommandToggleButton... buttons)
Adds toggle command buttons to the specified button group in this ribbon gallery. |
JCommandToggleButton |
getButtonAt(int index)
Returns the gallery button at specified index. |
int |
getButtonCount()
Returns the number of gallery buttons in this in-ribbon
gallery. |
CommandButtonDisplayState |
getButtonDisplayState()
|
List<JCommandToggleButton> |
getButtonGroup(String buttonGroupName)
Returns the list of buttons in the specifed button group. |
int |
getButtonGroupCount()
Returns the number of button groups in this in-ribbon
gallery. |
RibbonElementPriority |
getDisplayPriority()
Returns the current display priority for this in-ribbon
gallery. |
String |
getExpandKeyTip()
|
JCommandButtonPanel |
getPopupButtonPanel()
Returns the associated popup gallery. |
JRibbonBand.RibbonGalleryPopupCallback |
getPopupCallback()
|
int |
getPreferredPopupMaxButtonColumns()
|
int |
getPreferredPopupMaxVisibleButtonRows()
|
int |
getPreferredWidth(RibbonElementPriority state,
int availableHeight)
Returns the preferred width of this in-ribbon gallery for
the specified display state. |
JCommandToggleButton |
getSelectedButton()
Returns the currently selected gallery button. |
RibbonGalleryUI |
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 |
isShowingPopupPanel()
Returns indication whether the popup panel is showing. |
void |
removeRibbonGalleryButtons(JCommandToggleButton... buttons)
Removes the specified toggle command buttons from this ribbon gallery. |
void |
setButtonDisplayState(CommandButtonDisplayState buttonDisplayState)
|
void |
setDisplayPriority(RibbonElementPriority displayPriority)
Sets new display priority for this in-ribbon gallery. |
void |
setExpandKeyTip(String expandKeyTip)
|
void |
setGroupMapping(List<StringValuePair<List<JCommandToggleButton>>> buttons)
Sets the button groups for this ribbon gallery. |
void |
setPopupCallback(JRibbonBand.RibbonGalleryPopupCallback popupCallback)
|
void |
setPreferredPopupPanelDimension(int preferredPopupMaxButtonColumns,
int preferredPopupMaxVisibleButtonRows)
Sets the preferred dimension of the popup panel. |
void |
setPreferredVisibleButtonCount(RibbonElementPriority state,
int visibleButtonCount)
Set preferred width of this in-ribbon gallery for the
specified display state. |
void |
setSelectedButton(JCommandToggleButton selectedButton)
Sets new value for the currently selected gallery button. |
void |
setShowingPopupPanel(boolean isShowingPopupPanel)
Sets indication whether the popup panel is showing. |
void |
setUI(RibbonGalleryUI ui)
Sets the new UI delegate. |
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 |
---|
protected List<JCommandToggleButton> buttons
this
gallery.
protected CommandToggleButtonGroup buttonSelectionGroup
protected RibbonElementPriority displayPriority
this
in-ribbon gallery.
protected Map<RibbonElementPriority,Integer> preferredVisibleIconCount
protected List<StringValuePair<List<JCommandToggleButton>>> buttonGroups
protected int preferredPopupMaxButtonColumns
protected int preferredPopupMaxVisibleButtonRows
protected boolean isShowingPopupPanel
protected JRibbonBand.RibbonGalleryPopupCallback popupCallback
public static final String uiClassID
protected ActionListener dismissActionListener
#toDismissOnButtonClick
is true
, the listener
dismissed this gallery.
Constructor Detail |
---|
public JRibbonGallery()
Method Detail |
---|
public void setUI(RibbonGalleryUI ui)
ui
- New UI delegate.public void updateUI()
updateUI
in class JComponent
JComponent.updateUI()
public RibbonGalleryUI getUI()
RibbonGalleryUI
objectsetUI(org.pushingpixels.flamingo.internal.ui.ribbon.RibbonGalleryUI)
public String getUIClassID()
getUIClassID
in class JComponent
JComponent.getUIClassID()
,
UIDefaults.getUI(javax.swing.JComponent)
public void setPreferredVisibleButtonCount(RibbonElementPriority state, int visibleButtonCount)
this
in-ribbon gallery for the
specified display state.
state
- Display state.visibleButtonCount
- Preferred width for the specified state.public int getPreferredWidth(RibbonElementPriority state, int availableHeight)
this
in-ribbon gallery for
the specified display state.
state
- Display state.availableHeight
- Available height in pixels.
this
in-ribbon gallery for
the specified display state.public void setDisplayPriority(RibbonElementPriority displayPriority)
this
in-ribbon gallery.
displayPriority
- New display priority for this
in-ribbon gallery.public RibbonElementPriority getDisplayPriority()
this
in-ribbon
gallery.
this
in-ribbon
gallery.public int getButtonGroupCount()
this
in-ribbon
gallery.
this
in-ribbon
gallery.public List<JCommandToggleButton> getButtonGroup(String buttonGroupName)
buttonGroupName
- Button group name.
public int getButtonCount()
this
in-ribbon
gallery.
this
in-ribbon
gallery.public JCommandToggleButton getButtonAt(int index)
index
- Gallery button index.
public JCommandToggleButton getSelectedButton()
public void setSelectedButton(JCommandToggleButton selectedButton)
selectedButton
- New value for the currently selected gallery button.public JCommandButtonPanel getPopupButtonPanel()
public void setShowingPopupPanel(boolean isShowingPopupPanel)
isShowingPopupPanel
- Indication whether the popup panel is showing.public boolean isShowingPopupPanel()
true
if the popup panel is showing,
false
otherwise.public void setGroupMapping(List<StringValuePair<List<JCommandToggleButton>>> buttons)
buttons
- Button groups.public void addRibbonGalleryButtons(String buttonGroupName, JCommandToggleButton... buttons)
buttonGroupName
- Button group name.buttons
- Toggle command buttons to add to the specified button group.public void removeRibbonGalleryButtons(JCommandToggleButton... buttons)
buttons
- Toggle command buttons to remove from this gallery.public void setPreferredPopupPanelDimension(int preferredPopupMaxButtonColumns, int preferredPopupMaxVisibleButtonRows)
preferredPopupMaxButtonColumns
- Preferred maximum number of button columns for the popup
panel.preferredPopupMaxVisibleButtonRows
- Preferred maximum number of visible button rows for the popup
panel.public void setPopupCallback(JRibbonBand.RibbonGalleryPopupCallback popupCallback)
public JRibbonBand.RibbonGalleryPopupCallback getPopupCallback()
public int getPreferredPopupMaxButtonColumns()
public int getPreferredPopupMaxVisibleButtonRows()
public void setExpandKeyTip(String expandKeyTip)
public String getExpandKeyTip()
public CommandButtonDisplayState getButtonDisplayState()
public void setButtonDisplayState(CommandButtonDisplayState buttonDisplayState)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |