|
HOME | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--javax.swing.JPanel | +--com.ultraswing.CPanel | +--com.ultraswing.TitleBar
A tile bar, with a "close" button on the right optionally.
Field Summary |
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 | |
TitleBar(Container parent,
String title,
boolean isVertical)
Creates a TitleBar object |
|
TitleBar(Container parent,
String title,
Icon icon,
boolean isVertical)
Creates a TitleBar object |
|
TitleBar(Container parent,
String title,
Icon icon,
boolean isVertical,
boolean addCloseFrameButton)
Creates a TitleBar object |
Method Summary | |
void |
addActionListener(ActionListener l)
Adds an ActionListener for the "close" button pressed event |
protected void |
fireActionPerformed(ActionEvent event)
Notifies all listeners that have registered interest for notification on this event type. |
JPanel |
getButtonPanel()
Returns the JPanel on the right side of this titlebar. |
FlatButton |
getCloseWindowButton()
Returns the "close" button at the end of this TitleBar |
String |
getTitle()
Returns the title text string |
boolean |
isCloseButtonAdded()
Returns true if "close" button is already added |
void |
removeActionListener(ActionListener l)
Removes an ActionListener from the button. |
void |
removeCloseWindowButton()
Removes the "close" button at the end of this TitleBar |
void |
setAddCloseButton(boolean b)
If passed b is true, adds a "close" button at the end of this title bar |
void |
setBounds(int x,
int y,
int width,
int height)
|
void |
setBounds(Rectangle r)
|
void |
setHeight(int h)
Sets the height of this TitleBar |
void |
setVertical(boolean b)
If passed b is true, this titlebar is vertical |
Methods inherited from class com.ultraswing.CPanel |
contains, getPrefferedSize, onResize, paintBorder, processComponentEvent, setBackground, setBackgroundImage, setGradientBackground |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public TitleBar(Container parent, String title, boolean isVertical)
parent
- the parent containertitle
- title textisVertical
- if true, this TitleBar is verticalpublic TitleBar(Container parent, String title, Icon icon, boolean isVertical)
parent
- the parent containertitle
- title texticon
- the small icon placed in the beginning of this title barisVertical
- if true, this TitleBar is verticalpublic TitleBar(Container parent, String title, Icon icon, boolean isVertical, boolean addCloseFrameButton)
parent
- the parent containertitle
- title texticon
- the small icon placed in the beginning of this title barisVertical
- if true, this TitleBar is verticaladdCloseFrameButton
- if true, a "close" button is placed at the end of this title barMethod Detail |
public void setHeight(int h)
public void setBounds(Rectangle r)
setBounds
in class Component
public void setBounds(int x, int y, int width, int height)
setBounds
in class Component
public FlatButton getCloseWindowButton()
public void removeCloseWindowButton()
public String getTitle()
public void addActionListener(ActionListener l)
l
- the ActionListener to be addedpublic void removeActionListener(ActionListener l)
l
- the listener to be removedpublic void setAddCloseButton(boolean b)
b
is true, adds a "close" button at the end of this title bar
public boolean isCloseButtonAdded()
public JPanel getButtonPanel()
protected void fireActionPerformed(ActionEvent event)
event
- the ActionEvent objectpublic void setVertical(boolean b)
b
is true, this titlebar is vertical
|
HOME | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |