public class ButtonListGuiImpl.GroupButton extends BorderedPanelGuiImpl
| Modifier and Type | Field and Description |
|---|---|
private ButtonGuiImpl |
bt
The main button
|
private ButtonListGroupConfig |
config
Its configuration
|
private ButtonListGuiImpl.Items |
items
The list of its items
|
private ButtonListGuiImpl.ItemsControl |
itemsControl
The items control
|
private boolean |
processingClick
The intermediate state of processing automatic click
|
borderlisteners, location, mousePtr, nativeInsets, physicalLocation| Constructor and Description |
|---|
GroupButton(WidgetId id,
ButtonListGroupConfig cfg)
Creates the widget that represents the group button.
|
| Modifier and Type | Method and Description |
|---|---|
private void |
collapseItems()
Hides its items.
|
void |
doClick()
Simulates the user action of clicking on this button.
|
double |
getButtonHeight()
Returns its button height in character units.
|
java.lang.String |
getLabel()
Returns its label.
|
double |
height()
Returns its height in character units.
|
boolean |
isExpanded()
Test if the items list is expanded.
|
protected int[] |
mouseActions()
Determine the mouse actions processed by this widget.
|
private void |
onClick(boolean collapse)
The button click handler.
|
void |
setWidth(double width)
Sets the target width in character units
|
void |
updateConfig(ButtonListGroupConfig config)
Updates this widget according to the given configuration.
|
void |
updateFont(int font)
Updates the current item font.
|
void |
updateSize(double rowWidth,
double rowHeight)
Updates its dimension.
|
java.util.List<Widget<GuiOutputManager>> |
widgetsAsList(boolean system)
Fix child widgets z-order to be the button on the top of the other child widgets.
|
double |
width()
Returns its width in character units.
|
draw, drawPanel, getId, is3DBorder, isRMBEntrySupported, set3DBorder, setColorResolver, setCustomDraw, setId, setOptionalDrawborder, insets, isTransparent, setBorder, setTransparentadd, add, add, addContainerStateListener, addDirectly, belongsTo, checkWidget, childrenLocation, clipping, clipRectangle, copyState, currentFocus, currentFocus, cycleFocus, defaultFocus, deregisterSelectedWidget, destroy, detach, dimension, doLayout, dumpCurrentWidgets, dumpWidgets, endSizeChange, findMouseSource, firstFocus, focus, focusTraversable, focusWorker, formatDump, get, getAllSelectedWidgets, getClipRect, getEffectiveScrollableSize, getFocusInt, getIgnoreFocus, getLayout, getScrollableSize, getTabItemList, hasFocusable, lastFocus, minimumSize, moveAfterTabItem, moveBeforeTabItem, moveToBottom, moveToBottomInClass, moveToTop, moveToTopInClass, moveToZpos, nextFocus, normalizeZOrder, onWidgetAdded, onWidgetRemoved, paintOnTop, parentOf, prepareWidgets, prevFocus, processKeyEvent, reflectAncestorChange, reflectLocationChanged, registerSelectedWidget, remove, removeContainerStateListener, repaint, replace, requestFocus, requestFocus, setFocus, setFocusInt, setHeight, setIgnoreFocus, setInsets, setLayout, setPhysicalDimensionInt, setSize, setSize, setTabItemList, startSizeChange, swap, triggerContainerStateRedrawEnabled, unrealize, updateSizeWorker, widgets, widgetStateChanged_setHidden, _setVisible, activateDirectManipulation, addFocusListener, addKeyListener, afterConfigUpdateBase, ancestor, ancestorId, autoResize, bounds, clear, clearWidget, clipRectangle, clipRectangle, clipWith, config, copyColors, createMouseHoverAction, deactivateDirectManipulation, debug, disable, disableTooltip, displayPhysicalLocation, drawCaret, enable, enableTooltip, enclosingFrame, forceCursorOnFocus, forceVisibility, getActualBounds, getAndResetBitmap, getAndSetBitmap, getBitmapCopy, getCachedScreenLocation, getCachedScreenPhysicalLocation, getCustomMousePointer, getDefaultEvent, getEffectiveMousePointer, getLoadedMousePointer, getMenuMouse, getMouseActions, getMousePosition, getPortableMouseEventCoordinates, getSelectedText, getState, getTextHeight, getTextHeightNative, getTextHeightNative, getTextWidth, getTextWidth, getTextWidthNative, getTextWidthNative, getVisiblePart, getZOrderClass, hasFocus, hasTooltip, hidden, hide, highlighted, ignoreAction, initialHeight, initialWidth, isCurrent, isDirectManipulationActive, isDirectManipulationActiveOrInUIB, isDirectManipulationCapable, isDirectManipulationRequired, isDisplayed, isEnabled, isFocusable, isHeader, isMouseDrag, isRealized, isRepaintDisabled, isScreenLocationCached, isTabStop, isThreeD, isTotallyObscured, isVisible, isVisible, location, manageSystemActions, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, moveToBottom, moveToTop, name, navigable, oleDoDrop, oleDrag, oleDragging, oleStartDragging, onOleDragging, onOleDropEnd, parent, parent, parentObject, parentOrSelf, parentOrSelfObject, physicalBounds, physicalDimension, physicalLocation, postprocessConfig, prepParentLocation, preventFocusWhenMouseDownEventDefined, processDirectManipulationEvent, processEvent, processFocusEvent, processKeyEventForSelectableWidget, processKeyListeners, processMnemonic, processMnemonicImpl, processSystemKey, raiseLegacyMouseEvents, reflectSizeChanged, refresh, registerWidgetListener, repaint, repaint, requestSync, resetBitmap, resizeTo, resolveFont, resolvePopupMenuId, resolveTitleFont, screen, screenDimension, screenHeight, screenLocation, screenPhysicalLocation, screenWidth, setBitmap, setCachedScreenLocation, setCachedScreenPhysicalLocation, setDirectManipulationActive, setEnabled, setHidden, setHighlighted, setLocation, setLocation, setMousePointer, setMousePointer, setParent, setPhysicalLocation, setSensitiveForUIB, setState, setVisible, setWindow, show, showPopupMenu, supportsCustomMousePointer, sync, topLevelWindow, toString, translate, triggerLocationChanged, unregisterWidgetListener, updateSystemParent, widgetRealized, windowclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitwidgetsAsListacceptsEscAsAnyKey, acceptTrigger, addFocusListener, addKeyListener, ancestor, ancestorId, bounds, canMovetoTop, clearWidget, completeTrigger, config, defaultMousePtr, displayPhysicalLocation, drawCaret, enclosingFrame, enforceDefaultMousePtr, forceCursorOnFocus, forceVisibility, getActualBounds, getCustomMousePointer, getEffectiveMousePointer, getIdForTrigger, getLegacyWidget, getLoadedMousePointer, getMenuMouse, getMouseActions, getMousePosition, getSelectedText, getState, getTriggerWidget, getTriggerWidget, getVisiblePart, getZOrderClass, hasFocus, hasFocus, hasTooltip, hidden, hide, highlighted, ignoreEnable, initialHeight, initialWidth, isCurrent, isCurrent, isDirectManipulable, isDirectManipulationActive, isDirectManipulationActiveOrInUIB, isDisplayed, isDroppable, isEnabled, isFocusable, isHeader, isInitialValueLayout, isLegacyFocus, isProcessProgressEvent, isRealized, isRepaintDisabled, isTabStop, isThreeD, isTotallyObscured, isVisible, isVisible, location, maySwitchFocus, moveToBottom, moveToTop, name, navigable, oleDrag, parent, parent, parent, parentObject, parentOrSelf, parentOrSelfObject, physicalBounds, physicalDimension, physicalLocation, postprocessConfig, preventFocusWhenMouseDownEventDefined, processDirectManipulationEvent, processEvent, processFocusEvent, processKeyListeners, processMnemonic, raiseLegacyMouseEvents, refreshWidget, registerWidgetListener, repaint, repaint, requestFocus, requestSync, resizeTo, resolvePopupMenuId, screen, screenLocation, screenPhysicalLocation, setDirectManipulationActive, setEnabled, setHidden, setHighlighted, setLocation, setLocation, setMousePointer, setMousePointer, setParent, setPhysicalLocation, setSensitiveForUIB, setState, setVisible, setWindow, show, startTrigger, supportsCustomMousePointer, systemFocusGrabbed, topLevelWindow, unregisterWidgetListener, validateDisplayValue, windowprivate ButtonListGroupConfig config
private ButtonGuiImpl bt
private ButtonListGuiImpl.Items items
private ButtonListGuiImpl.ItemsControl itemsControl
private boolean processingClick
public GroupButton(WidgetId id, ButtonListGroupConfig cfg)
id - The given widget's id.cfg - The widget's configurationpublic java.util.List<Widget<GuiOutputManager>> widgetsAsList(boolean system)
widgetsAsList in interface Container<GuiOutputManager>widgetsAsList in class AbstractContainer<GuiOutputManager>system - The system flag that isn't used for this widget.public void setWidth(double width)
setWidth in interface Container<GuiOutputManager>setWidth in class AbstractContainer<GuiOutputManager>width - The given widthpublic double height()
height in interface Widget<GuiOutputManager>height in class AbstractContainer<GuiOutputManager>public double getButtonHeight()
public java.lang.String getLabel()
public boolean isExpanded()
public void doClick()
public double width()
width in interface Widget<GuiOutputManager>width in class AbstractContainer<GuiOutputManager>public void updateSize(double rowWidth,
double rowHeight)
rowWidth - The given widthrowHeight - The given heightpublic void updateFont(int font)
font - The new fontpublic void updateConfig(ButtonListGroupConfig config)
config - The button's configurationprivate void collapseItems()
protected int[] mouseActions()
mouseActions in class AbstractWidget<GuiOutputManager>private void onClick(boolean collapse)
collapse - The boolean value to hide or to show items if it is true or false respectively.