org.zaval.lw
Class LwStatusBar

java.lang.Object
  |
  +--org.zaval.util.ValidationObject
        |
        +--org.zaval.lw.LwCanvas
              |
              +--org.zaval.lw.LwPanel
                    |
                    +--org.zaval.lw.LwStatusBar
All Implemented Interfaces:
Drawable, Layoutable, LayoutContainer, LwComponent, LwContainer, Validationable

public class LwStatusBar
extends LwPanel

This is status bar light weight component. The component is a light weight container that uses special layout manager to place status bar components, so don't set any other layout manager for the container. The container layouts child components according to it percentage constraint. The constraint should be passed to add or insert methods of the container as an Integer object where the int value defines the percent. The percent determines width of the child relatively the container width. The sample below illustrates the component usage

   ...
   LwStatusBar status = new LwStatusBar();
   status.add (new Integer(30), new LwLabel("Label 1"));
   status.add (new Integer(70), new LwLabel("Label 2"));
   ...
 

The child components should have identical borders, so the component has special setBorderView method that defines the common border view. The view will set for all added components.


Fields inherited from class org.zaval.lw.LwPanel
children
 
Fields inherited from class org.zaval.lw.LwCanvas
bits, height, insets, parent, psHeight, psWidth, skins, width, x, y
 
Fields inherited from class org.zaval.util.ValidationObject
isValidFlag
 
Constructor Summary
LwStatusBar()
          Constructs the class instance.
LwStatusBar(int gap)
          Constructs the class with the specified horizontal gap between child components.
 
Method Summary
 void insert(int i, java.lang.Object s, LwComponent d)
          Inserts the specified lightweight component with the specified constraints as a child of this container at the specified position in the container list.
 void setBorderView(LwView v)
          Sets the border view that should be applied for all child components.
 
Methods inherited from class org.zaval.lw.LwPanel
add, add, calcPreferredSize, count, get, getDefaultLayout, getLayoutOffset, getLwComponentAt, getLwLayout, indexOf, insert, invalidate, paintOnTop, recalc, remove, remove, removeAll, setBackground, setLwLayout, setOpaque, toFront, updateCashedPs
 
Methods inherited from class org.zaval.lw.LwCanvas
canHaveFocus, getBackground, getBounds, getHeight, getInsets, getLocation, getLwParent, getOrigin, getPreferredSize, getSize, getViewMan, getVisiblePart, getWidth, getX, getY, hasFocus, isEnabled, isOpaque, isVisible, paint, repaint, repaint, requestFocus, setEnabled, setInsets, setLocation, setLwParent, setPSSize, setSize, setViewMan, setVisible, toString, update, validate, viewManChanged, vrp
 
Methods inherited from class org.zaval.util.ValidationObject
isValid
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.zaval.lw.LwComponent
canHaveFocus, getLwParent, getViewMan, getVisiblePart, setEnabled, setLwParent, setViewMan, setVisible
 
Methods inherited from interface org.zaval.lw.Drawable
getBackground, getOrigin, isEnabled, isOpaque, paint, repaint, repaint, update
 
Methods inherited from interface org.zaval.util.Validationable
isValid, validate
 
Methods inherited from interface org.zaval.lw.Layoutable
getBounds, getHeight, getInsets, getLocation, getPreferredSize, getSize, getWidth, getX, getY, isVisible, setLocation, setSize
 

Constructor Detail

LwStatusBar

public LwStatusBar()
Constructs the class instance.

LwStatusBar

public LwStatusBar(int gap)
Constructs the class with the specified horizontal gap between child components.
Parameters:
hgap - the specified horizontal gap.
Method Detail

setBorderView

public void setBorderView(LwView v)
Sets the border view that should be applied for all child components. The method sets the border view for all child components that have been added to the container before.
Parameters:
v - the specified border view.

insert

public void insert(int i,
                   java.lang.Object s,
                   LwComponent d)
Description copied from class: LwPanel
Inserts the specified lightweight component with the specified constraints as a child of this container at the specified position in the container list. The method calls componentAdded method its layout manager to inform the layout manager that the new child has been added with the given constraints.
Overrides:
insert in class LwPanel
Following copied from class: org.zaval.lw.LwPanel
Parameters:
i - the position in the container list at which to insert the component.
s - the object expressing layout contraints for this.
d - the lightweight component to be added.


Copyright © Zaval Creative Engineering Group, 2000-2005.
http://www.zaval.org