|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectfi.hut.tml.xsmiles.gui.components.awt.ComponentWithCaption
The base base class for all AWT & Swing components that have a caption
| Field Summary | |
protected boolean |
actionable
|
protected int |
axis
the axis depends on the caption side CSS attribute |
protected AWTCaption |
caption
the caption component |
protected java.awt.Container |
container
the top-level container, containing the caption and the content component |
protected AWTStylableComponent |
content
the content component (e.g. |
protected double |
currentZoom
|
protected boolean |
layoutDone
|
static int |
X_AXIS
Specifies that components should be laid out left to right. |
static int |
Y_AXIS
Specifies that components should be laid out top to bottom. |
| Constructor Summary | |
ComponentWithCaption()
|
|
| Method Summary | |
void |
addActionListener(java.awt.event.ActionListener al)
|
protected abstract void |
addCaption(java.lang.String text)
|
void |
addFocusListener(java.awt.event.FocusListener fl)
|
void |
addHelpListener(java.awt.event.ActionListener fl)
add a listener for help events |
void |
addMouseListener(java.awt.event.MouseListener ml)
|
boolean |
getActionable()
By default components are inactive |
java.awt.Component |
getComponent()
|
java.awt.Color |
getDefaultBackgroundColor()
the default background color for this type of component null = transparent. |
int |
getHeight()
|
java.awt.Dimension |
getMinimumSize()
return the minimum size for this component at zoom level 1.0 |
java.awt.Dimension |
getSize()
|
org.w3c.dom.css.CSSStyleDeclaration |
getStyle()
|
int |
getWidth()
|
int |
getX()
|
int |
getY()
|
void |
init()
in init the subclass always creates its component first and then calls super.init (SwingComponent or AWTComponent) |
protected void |
layoutComponent()
layouts the component using the caption, content and the main container parts of the control |
void |
removeActionListener(java.awt.event.ActionListener al)
|
void |
removeFocusListener(java.awt.event.FocusListener fl)
|
void |
removeHelpListener(java.awt.event.ActionListener fl)
remove a listener for help events |
void |
removeMouseListener(java.awt.event.MouseListener ml)
|
void |
setActionable(boolean a)
|
void |
setBackground(java.awt.Color bg)
set the background, if null, then reset to default |
void |
setBounds(int x,
int y,
int width,
int height)
Set the bounds of Container |
void |
setCaptionStyle(org.w3c.dom.css.CSSStyleDeclaration style)
|
void |
setCaptionText(java.lang.String text)
set the text shown in the caption |
void |
setEnabled(boolean b)
|
void |
setFocus()
set the focus to this control |
void |
setFont(java.awt.Font f)
Sets the components font |
void |
setForeground(java.awt.Color bg)
set the foreground |
abstract void |
setHintText(java.lang.String hint)
Sets the components Tooltip (Hint) text |
void |
setStyle(org.w3c.dom.css.CSSStyleDeclaration style)
|
void |
setVisible(boolean v)
Set this drawing area visible. |
void |
setZoom(double zoom)
Set's this components zoom (1.0 is the default). |
protected void |
sizeComponent(double zoom)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int X_AXIS
public static final int Y_AXIS
protected AWTStylableComponent content
protected java.awt.Container container
protected AWTCaption caption
protected int axis
protected boolean actionable
protected boolean layoutDone
protected double currentZoom
| Constructor Detail |
public ComponentWithCaption()
| Method Detail |
public void init()
protected void layoutComponent()
public void setCaptionStyle(org.w3c.dom.css.CSSStyleDeclaration style)
public void setStyle(org.w3c.dom.css.CSSStyleDeclaration style)
public org.w3c.dom.css.CSSStyleDeclaration getStyle()
public boolean getActionable()
public void setActionable(boolean a)
a - The value of actionablepublic java.awt.Component getComponent()
protected abstract void addCaption(java.lang.String text)
public void setCaptionText(java.lang.String text)
public void setZoom(double zoom)
protected void sizeComponent(double zoom)
public void setFont(java.awt.Font f)
public abstract void setHintText(java.lang.String hint)
public void setVisible(boolean v)
v - true=visible, false=invisiblepublic void setEnabled(boolean b)
b - Active or not activepublic java.awt.Color getDefaultBackgroundColor()
public java.awt.Dimension getMinimumSize()
public void setBackground(java.awt.Color bg)
public void setForeground(java.awt.Color bg)
public void setBounds(int x,
int y,
int width,
int height)
x - X locationy - X locationwidth - X locationheight - X locationpublic int getX()
public int getY()
public int getWidth()
public int getHeight()
public java.awt.Dimension getSize()
public void addActionListener(java.awt.event.ActionListener al)
public void removeActionListener(java.awt.event.ActionListener al)
public void addFocusListener(java.awt.event.FocusListener fl)
public void removeFocusListener(java.awt.event.FocusListener fl)
public void addMouseListener(java.awt.event.MouseListener ml)
public void removeMouseListener(java.awt.event.MouseListener ml)
public void setFocus()
public void addHelpListener(java.awt.event.ActionListener fl)
public void removeHelpListener(java.awt.event.ActionListener fl)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||