public class Card extends Object implements HasAncestor
Modifier and Type | Class and Description |
---|---|
static interface |
Card.ContainerPanel |
Modifier and Type | Field and Description |
---|---|
static int |
ALREADY_MADE
A flag.
|
static int |
ALREADY_SHOWN |
CardPanel |
cardPanel
The CardPanel this card was added to.
|
static int |
CLOSEABLE
A flag.
|
IImage |
closedImage
If this is not null then it will be displayed when the card is not selected.
|
static int |
DISABLED
A flag.
|
int |
flags
These are flags that apply to the Card.
|
static int |
HIDDEN
A flag.
|
int |
hotKey
An optional hot-key to for the Card.
|
IImage |
icon
This is the icon that was associated with the Card, separate from the tabName.
|
FontMetrics |
iconizeFontMetrics
This is the FontMetrics that will be used with the Iconize method.
|
IImage |
image
If this is not null then this will be displayed instead of the tab text.
|
Control |
item
This is the item that was added to the MultiPanel.
|
static boolean |
loadImageViaControl
If this is set to true then images are loaded via the Control.loadImage() - which loads image
as Pictures, not Icons and which double sizes images if the default GUI font size is equal to or greater than 24.
|
String |
longName
This is the longName given to the item when it was added to the MultiPanel.
|
CellPanel |
panel
This is the CellPanel which contains the item which was added to the MultiPanel.
|
String |
tabName
This is the short (tab) name given to the item when it was added to the MultiPanel.
|
Object |
tip
If this is not null then this will be the tool tip for the tab.
|
Constructor and Description |
---|
Card() |
Card(Control c,
String tn,
String ln,
boolean autoScroll) |
Modifier and Type | Method and Description |
---|---|
protected CellPanel |
createContainerFor(Control c)
This is called by setup() and creates a CellPanel that the Control will be added to, but should not actually add it.
|
void |
doShown() |
HasAncestor |
getAncestor() |
Drawable |
getAsDrawable(Container parent,
int width,
int height) |
static CardControl |
getCardControl(Control c) |
CardPanel |
getCardPanel() |
Container |
getContents() |
static Card |
getMyCard(Control c)
Find the Card the specified Control is contained within.
|
Control |
getParent(Class ofType) |
Card |
iconize(IImage icon)
Call this after you have specified the tab name.
|
Card |
iconize(IImage icon,
boolean iconOnlyWhenClosed)
Call this after you have specified the tab name.
|
Card |
iconize(String imageName)
This iconizes the tab with the icon of the specified name and, tells the Card to
display an icon only when it is deslected ONLY if it is running on a PDA sized screen.
|
Card |
iconize(String imageName,
boolean iconOnlyWhenClosed)
Call this after you have specified the tab name.
|
void |
setup(Control c,
String tn,
String ln,
boolean autoScroll)
Deprecated.
use the other setup() instead.
|
void |
setup(Control c,
String tn,
String ln,
int cardOptions) |
String |
toString()
Return a String representation of this object.
|
public static boolean loadImageViaControl
public String longName
public String tabName
public CellPanel panel
public Control item
public IImage image
public IImage closedImage
public IImage icon
public Object tip
public int hotKey
public int flags
public static final int DISABLED
public static final int HIDDEN
public static final int CLOSEABLE
public static final int ALREADY_MADE
public static final int ALREADY_SHOWN
public CardPanel cardPanel
public FontMetrics iconizeFontMetrics
public Card iconize(IImage icon)
icon
- The icon to use with this tab.public Card iconize(IImage icon, boolean iconOnlyWhenClosed)
icon
- The icon to use with this tab.iconOnlyWhenClosed
- Indicates that only the icon should be displayed when the tab
is not selected.public Card iconize(String imageName, boolean iconOnlyWhenClosed)
imageName
- The name of the icon.iconOnlyWhenClosed
- Indicates that only the icon should be displayed when the tab
is not selected.public Card iconize(String imageName)
imageName
- The name of the icon.protected CellPanel createContainerFor(Control c)
c
- the control being set as the Card item.public void doShown()
public String toString()
Object
public void setup(Control c, String tn, String ln, boolean autoScroll)
c
- tn
- ln
- autoScroll
- public static Card getMyCard(Control c)
c
- the Control.public static CardControl getCardControl(Control c)
public CardPanel getCardPanel()
public Container getContents()
public HasAncestor getAncestor()
getAncestor
in interface HasAncestor