|
JComponentPack 1.5.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
com.zfqjava.swing.JStatusBar
public class JStatusBar
JStatusBar provides a component to attach a status bar.
Client Property:
| Name | Value | Default Value |
|---|---|---|
| JStatusBar.clientBorder |
|
Auto |
| Nested Class Summary | |
|---|---|
protected class |
JStatusBar.AccessibleJStatusBar
This class implements accessibility support for the JStatusBar class. |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
static int |
EDITOR
Identifies the editor status bar type. |
static int |
EXPLORER
Identifies the explorer status bar type. |
static int |
VIEWER
Identifies the viewer status bar type. |
| 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 | |
|---|---|
JStatusBar()
Creates a status bar instance. |
|
JStatusBar(int type)
Constructs a status bar for the specified type. |
|
| Method Summary | |
|---|---|
protected void |
addImpl(Component comp,
Object constraints,
int index)
If a JButton is being added, it is initially
set to be disabled. |
AccessibleContext |
getAccessibleContext()
Gets the AccessibleContext associated with this JStatusBar. |
Component |
getComponentAt(int index)
Returns the component at the specified index. |
Insets |
getMargin()
Returns the margin between the status bar's border and its buttons. |
JProgressBar |
getProgressBar()
Returns the progress bar in this status bar. |
int |
getType()
Returns the status bar type. |
StatusBarUI |
getUI()
Returns the status bar's current UI. |
String |
getUIClassID()
Returns the name of the L&F class that renders this component. |
double |
getWeight(Component comp)
Returns the weight for the specified component. |
int |
indexOfComponent(Component c)
Returns the index of the specified component. |
boolean |
isBorderPainted()
Gets the borderPainted property. |
protected void |
paintBorder(Graphics g)
Paints the status bar's border if the borderPainted property
is true. |
protected String |
paramString()
Returns a string representation of this JStatusBar. |
void |
setBorderPainted(boolean b)
Sets the borderPainted property, which is
true if the border should be painted. |
void |
setIcon(Icon icon)
Sets the icon for current status bar. |
void |
setLayout(LayoutManager mgr)
|
void |
setMargin(Insets m)
Sets the margin between the status bar's border and its buttons. |
void |
setText(String text)
Sets the text for current status bar. |
void |
setType(int type)
Sets the status bar type. |
void |
setUI(StatusBarUI ui)
Sets the L&F object that renders this component. |
void |
setWeight(Component comp,
double weight)
Sets the weight for the specified component. |
void |
updateUI()
Notification from the UIFactory that the L&F has changed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int EXPLORER
public static final int EDITOR
public static final int VIEWER
| Constructor Detail |
|---|
public JStatusBar()
public JStatusBar(int type)
type - the status bar type| Method Detail |
|---|
public StatusBarUI getUI()
setUI(com.zfqjava.swing.plaf.StatusBarUI)public void setUI(StatusBarUI ui)
ui - the StatusBarUI L&F objectUIDefaults.getUI(javax.swing.JComponent)public void updateUI()
UIFactory that the L&F has changed.
Called to replace the UI with the latest version from the
UIFactory.
updateUI in class JComponentJComponent.updateUI()public String getUIClassID()
getUIClassID in class JComponentJComponent.getUIClassID(),
UIDefaults.getUI(javax.swing.JComponent)public void setType(int type)
One of 3 legal values:
type - the status bar typegetType()public int getType()
setType(int)public void setText(String text)
text - the textpublic void setIcon(Icon icon)
icon - the iconpublic JProgressBar getProgressBar()
public void setMargin(Insets m)
null causes the status bar to
use the default margins. The status bar's default Border
object uses this value to create the proper margin.
However, if a non-default border is set on the status bar,
it is that Border object's responsibility to create the
appropriate margin space (otherwise this property will
effectively be ignored).
m - an Insets object that defines the space
between the border and the buttonsInsetspublic Insets getMargin()
Insets object containing the margin valuesInsetspublic boolean isBorderPainted()
borderPainted property.
borderPainted propertysetBorderPainted(boolean)public void setBorderPainted(boolean b)
borderPainted property, which is
true if the border should be painted.
The default value for this property is true.
Some look and feels might not implement painted borders;
they will ignore this property.
b - if true, the border is paintedisBorderPainted()protected void paintBorder(Graphics g)
borderPainted property
is true.
paintBorder in class JComponentg - the Graphics context in which the painting
is doneJComponent.paint(java.awt.Graphics),
JComponent.setBorder(javax.swing.border.Border)public final void setLayout(LayoutManager mgr)
setLayout in class Container
public void setWeight(Component comp,
double weight)
comp - the componentweight - the weightgetWeight(java.awt.Component)public double getWeight(Component comp)
comp - the componentsetWeight(java.awt.Component, double)public int indexOfComponent(Component c)
c - the Component to find
public Component getComponentAt(int index)
index - the component's position, where 0 is first
Component at that position,
or null for an invalid index
protected void addImpl(Component comp,
Object constraints,
int index)
JButton is being added, it is initially
set to be disabled.
addImpl in class Containercomp - the component to be enhancedconstraints - the constraints to be enforced on the componentindex - the index of the componentprotected String paramString()
null.
paramString in class JComponentpublic AccessibleContext getAccessibleContext()
getAccessibleContext in interface AccessiblegetAccessibleContext in class JComponent
|
JComponentPack 1.5.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||