|
JIDE 3.5.15 | ||||||||
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.jidesoft.status.StatusBar
public class StatusBar
A custom status bar component.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
JPanel.AccessibleJPanel |
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 |
---|
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 | |
---|---|
StatusBar()
Default constructor. |
Method Summary | |
---|---|
void |
add(Component comp,
Object constraints)
|
protected void |
addExtraSeparator()
|
protected void |
addImpl(Component comp,
Object constraints,
int index)
|
void |
addSeparator()
Adds a separator. |
void |
componentAdded(ContainerEvent e)
Invoked when a component has been added to the container. |
void |
componentHidden(ComponentEvent e)
|
void |
componentMoved(ComponentEvent e)
|
void |
componentRemoved(ContainerEvent e)
Invoked when a component has been removed from the container. |
void |
componentResized(ComponentEvent e)
|
void |
componentShown(ComponentEvent e)
|
protected StatusBarSeparator |
createStatusBarSeparator()
Creates the status bar separator. |
StatusBarItem |
getItemByName(String name)
Gets status bar item by its name. |
int |
getPreferredHeight()
Returns the current height of this component. |
Dimension |
getPreferredSize()
If the preferredSize has been set to a non-null value just returns it. |
boolean |
isAutoAddSeparator()
Checks if a separator will be added automatically when a new status bar item is added. |
boolean |
isChildrenOpaque()
Checks if the children should be opaque. |
protected void |
paintComponent(Graphics g)
|
void |
remove(int index)
|
void |
remove(String name)
Removes the status bar item by name. |
protected boolean |
removeExtraSeparator()
|
void |
resetToPreferredSizes()
Lays out the JideSplitPane layout based on the preferred size of the children components. |
void |
setAutoAddSeparator(boolean autoAddSeparator)
Sets the value of autoAddSeparator. |
void |
setChildrenOpaque(boolean childrenOpaque)
Sets the opaque attribute of status bar items. |
void |
setItemVisible(String name,
boolean visible)
Sets the visibility of status bar item. |
void |
updateUI()
Resets the UI property with a value from the current look and feel. |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public StatusBar()
Method Detail |
---|
protected void addImpl(Component comp, Object constraints, int index)
addImpl
in class Container
public void remove(int index)
remove
in class Container
public void add(Component comp, Object constraints)
add
in class Container
public void remove(String name)
name
- the name of the status bar item to be removed.public boolean isAutoAddSeparator()
public void setAutoAddSeparator(boolean autoAddSeparator)
autoAddSeparator
- true or false.public void componentAdded(ContainerEvent e)
componentAdded
in interface ContainerListener
e
- ContainerEventpublic void componentRemoved(ContainerEvent e)
componentRemoved
in interface ContainerListener
e
- ContainerEventpublic void componentResized(ComponentEvent e)
componentResized
in interface ComponentListener
public void componentMoved(ComponentEvent e)
componentMoved
in interface ComponentListener
public void componentShown(ComponentEvent e)
componentShown
in interface ComponentListener
public void resetToPreferredSizes()
JideSplitPane
layout based on the preferred size of the children components. This will
likely result in changing the divider location.
public void componentHidden(ComponentEvent e)
componentHidden
in interface ComponentListener
protected boolean removeExtraSeparator()
protected void addExtraSeparator()
protected StatusBarSeparator createStatusBarSeparator()
public void addSeparator()
isAutoAddSeparator()
is true, you don't need to add separator manually because a
separator will be added automatically between two status bar items. Only when it's false, you need to add
separator manually using this method.
public void updateUI()
updateUI
in class JPanel
JComponent.updateUI()
public StatusBarItem getItemByName(String name)
name
- item name
public int getPreferredHeight()
component.getBounds().height
, or component.getSize().height
because it doesn't cause
any heap allocations.
public Dimension getPreferredSize()
preferredSize
has been set to a non-null
value just returns it. If the UI
delegate's getPreferredSize
method returns a non null
value then return that; otherwise
defer to the component's layout manager.
getPreferredSize
in class JComponent
preferredSize
propertyJComponent.setPreferredSize(java.awt.Dimension)
,
ComponentUI
public void setItemVisible(String name, boolean visible)
name
- the name of the status bar item.visible
- true or falseprotected void paintComponent(Graphics g)
paintComponent
in class JComponent
public boolean isChildrenOpaque()
public void setChildrenOpaque(boolean childrenOpaque)
childrenOpaque
- true or false.
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |