|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--javax.swing.JComponent
|
+--com.zfqjava.swing.JStatusBar
JStatusBar provides a component to attach a status bar.
Client Property:
| Name | Value | Default Value |
|---|---|---|
| JStatusBar.clientBorder |
|
Auto |
| Inner Class Summary | |
protected class |
JStatusBar.AccessibleJStatusBar
This class implements accessibility support for the JStatusBar class. |
| Inner classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
| Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
| 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(java.awt.Component comp,
java.lang.Object constraints,
int index)
If a JButton is being added, it is initially
set to be disabled. |
javax.accessibility.AccessibleContext |
getAccessibleContext()
Gets the AccessibleContext associated with this JStatusBar. |
java.awt.Component |
getComponentAt(int index)
Returns the component at the specified index. |
java.awt.Insets |
getMargin()
Returns the margin between the status bar's border and its buttons. |
javax.swing.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. |
java.lang.String |
getUIClassID()
Returns the name of the L&F class that renders this component. |
double |
getWeight(java.awt.Component comp)
Returns the weight for the specified component. |
int |
indexOfComponent(java.awt.Component c)
Returns the index of the specified component. |
boolean |
isBorderPainted()
Gets the borderPainted property. |
protected void |
paintBorder(java.awt.Graphics g)
Paints the status bar's border if the borderPainted property
is true. |
protected java.lang.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(javax.swing.Icon icon)
Sets the icon for current status bar. |
void |
setLayout(java.awt.LayoutManager mgr)
|
void |
setMargin(java.awt.Insets m)
Sets the margin between the status bar's border and its buttons. |
void |
setText(java.lang.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(java.awt.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 javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, validate, validateTree |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus |
| 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 javax.swing.JComponentJComponent.updateUI()public java.lang.String getUIClassID()
getUIClassID in class javax.swing.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(java.lang.String text)
text - the textpublic void setIcon(javax.swing.Icon icon)
icon - the iconpublic javax.swing.JProgressBar getProgressBar()
public void setMargin(java.awt.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 java.awt.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(java.awt.Graphics g)
borderPainted property
is true.paintBorder in class javax.swing.JComponentg - the Graphics context in which the painting
is doneJComponent.paint(java.awt.Graphics),
JComponent.setBorder(javax.swing.border.Border)public final void setLayout(java.awt.LayoutManager mgr)
setLayout in class java.awt.Container
public void setWeight(java.awt.Component comp,
double weight)
component - the componentweight - the weightgetWeight(java.awt.Component)public double getWeight(java.awt.Component comp)
comp - the componentsetWeight(java.awt.Component, double)public int indexOfComponent(java.awt.Component c)
c - the Component to findpublic java.awt.Component getComponentAt(int index)
i - the component's position, where 0 is firstComponent at that position,
or null for an invalid index
protected void addImpl(java.awt.Component comp,
java.lang.Object constraints,
int index)
JButton is being added, it is initially
set to be disabled.addImpl in class java.awt.Containercomp - the component to be enhancedconstraints - the constraints to be enforced on the componentindex - the index of the componentprotected java.lang.String paramString()
null.paramString in class javax.swing.JComponentpublic javax.accessibility.AccessibleContext getAccessibleContext()
getAccessibleContext in interface javax.accessibility.AccessiblegetAccessibleContext in class javax.swing.JComponent
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||