public class WCardPanel extends WPanel
| Constructor and Description |
|---|
WCardPanel() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(int index,
WWidget card)
Adds a card to this panel without resizing it.
|
void |
add(int index,
WWidget card,
int width,
int height)
Adds a card to this panel and resizes it.
|
void |
add(WWidget card)
Adds a card to this panel without resizing it.
|
void |
add(WWidget card,
int width,
int height)
Adds a card to this panel and resizes it.
|
void |
addPainters()
Adds the default background painters to this widget and all children.
|
void |
createPeers(GuiDescription c)
Creates "heavyweight" component peers
|
int |
getCardCount()
Gets the number of cards in this panel.
|
WWidget |
getSelectedCard()
Gets the selected card of this panel.
|
int |
getSelectedIndex()
Gets the index of the selected card in this panel.
|
void |
layout()
Uses this Panel's layout rules to reposition and resize components to fit nicely in the panel.
|
WCardPanel |
setSelectedCard(WWidget selectedCard)
Sets the selected card of this panel.
|
WCardPanel |
setSelectedIndex(int selectedIndex)
Sets the selected index of this panel.
|
void |
setSize(int x,
int y)
Sets the size of this widget.
|
void |
validate(GuiDescription c)
Creates component peers, lays out children, and initializes animation data for this Widget and all its children.
|
canResize, cycleFocus, cycleFocus, expandToFit, expandToFit, getBackgroundPainter, hit, onHidden, onShown, paint, remove, setBackgroundPainter, tick, toStringaddTooltip, canFocus, getAbsoluteX, getAbsoluteY, getHeight, getHost, getParent, getWidth, getX, getY, isActivationKey, isFocused, isWithinBounds, onCharTyped, onClick, onFocusGained, onFocusLost, onKeyPressed, onKeyReleased, onMouseDown, onMouseDrag, onMouseMove, onMouseScroll, onMouseUp, releaseFocus, renderTooltip, requestFocus, setHost, setLocation, setParentpublic void add(WWidget card)
card - the added cardpublic void add(int index,
WWidget card)
index - the index of the cardcard - the added cardpublic void add(WWidget card, int width, int height)
card - the added cardwidth - the new widthheight - the new heightpublic void add(int index,
WWidget card,
int width,
int height)
index - the index of the cardcard - the added cardwidth - the new widthheight - the new heightpublic int getSelectedIndex()
public WCardPanel setSelectedIndex(int selectedIndex)
selectedIndex - the new selected indexjava.lang.IndexOutOfBoundsException - if this panel does not contain the card indexpublic WWidget getSelectedCard()
public WCardPanel setSelectedCard(WWidget selectedCard)
selectedCard - the new selected cardjava.util.NoSuchElementException - if this panel does not contain the cardpublic int getCardCount()
public void setSize(int x,
int y)
WWidgetOverriding methods may restrict one of the dimensions to be
a constant value, for example super.setSize(x, 20).
public void layout()
WPanelpublic void validate(GuiDescription c)
Subclasses should call super.validate(c) to ensure that children are validated.
public void createPeers(GuiDescription c)
WWidgetcreatePeers in class WPanelc - the top-level Container that will hold the peers@Environment(value=CLIENT) public void addPainters()
WPanelAlways called before GuiDescription.addPainters() to allow users to modify painters.
Subclasses should call super.addPainters() to ensure that children have proper default painters.
addPainters in class WPanel