: Download: FAQ: Licensing: Support: Contact ME
LwVCL Home
Introduction
Overview
Screen Shots
On-line Demos
Requirements
Further Plans
Docs
Tutorial
How-to (PDF)
API
FAQ
Download
Latest version

Home > J2SE > API

Overview  Package   Class  Tree  Deprecated  Index  Help 

org.zaval.lw
Class LwActContainer

java.lang.Object
  |
  +--org.zaval.lw.LwCanvas
        |
        +--org.zaval.lw.LwPanel
              |
              +--org.zaval.lw.LwActContainer
All Implemented Interfaces:
Layoutable, LayoutContainer, LwComponent, LwComposite, LwContainer, Validationable
Direct Known Subclasses:
LwButton, LwCheckbox

public class LwActContainer
extends LwPanel
implements LwComposite

This class can be used for creating lightweight containers that:

  • Want to have focus.
  • Have a special child component that can be selected with rectangle frame if the container has focus. Use the setAsFocusComponent method to define the child component. The child is called focus indicator component.

This class is a composite component that catches all the child components events.


Fields inherited from class org.zaval.lw.LwPanel
children
 
Fields inherited from class org.zaval.lw.LwCanvas
bits, bottom, height, isValidValue, left, parent, psHeight, psWidth, right, skins, temporary, top, width, x, y
 
Constructor Summary
LwActContainer(LwComponent t)
          Constructs the container with the specified child component.
 
Method Summary
 boolean canHaveFocus()
          Specifies if the component can have focus.
 boolean catchInput(LwComponent child)
          Checks if the input event for the specified child component should be caught by the parent.
protected  LwLayout getDefaultLayout()
          Gets the default layout manager that is set with the container during initialization.
 LwComponent getFocusComponent()
          Gets the child component that is used to indicate whenever the component has focus.
 java.awt.Color getRectColor()
          Gets the border color that is used to paint rectangle frame around the focus idicator component.
 void paintOnTop(java.awt.Graphics g)
          Paints additional elements (for example marker) after the container and its child components have been rendered.
 void remove(int i)
          Removes the component, specified by the index, from this container.
 void removeAll()
          Removes all child components from this container.
 void setAsFocusComponent(int index)
          Sets a child focus indicator component by the specified child index.
 void setRectColor(java.awt.Color c)
          Sets the specified color to paint rectangle frame around the focus indicator component in case if the container has set focus indicator component.
 
Methods inherited from class org.zaval.lw.LwPanel
add, add, calcPreferredSize, count, get, getLayoutOffset, getLwComponentAt, getLwLayout, getPreferredSize, indexOf, insert, insert, invalidate, isInvalidatedByChild, laidout, remove, setBackground, setLwLayout, setOpaque, setSize, toFront, updateCashedPs, validate
 
Methods inherited from class org.zaval.lw.LwCanvas
calcInsets, customize, cvp, getBackground, getBottom, getBounds, getHeight, getInsets, getLeft, getLocation, getLwParent, getOrigin, getPSImpl, getRight, getSize, getTop, getViewMan, getVisiblePart, getWidth, getX, getY, hasFocus, isEnabled, isOpaque, isValid, isVisible, paint, recalc, repaint, repaint, repaint, requestFocus, setEnabled, setInsets, setLocation, setLwParent, setPSSize, setViewMan, setVisible, update, viewManChanged, vrp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.zaval.lw.LwContainer
add, add, getLwLayout, indexOf, insert, isInvalidatedByChild, setLwLayout
 
Methods inherited from interface org.zaval.lw.LwComponent
getBackground, getLwComponentAt, getLwParent, getOrigin, getViewMan, getVisiblePart, isEnabled, isOpaque, paint, repaint, repaint, repaint, setBackground, setEnabled, setInsets, setLwParent, setOpaque, setViewMan, setVisible, update
 
Methods inherited from interface org.zaval.lw.Layoutable
getBounds, getHeight, getInsets, getLocation, getPreferredSize, getSize, getWidth, getX, getY, isVisible, setLocation, setSize
 
Methods inherited from interface org.zaval.util.Validationable
invalidate, isValid, validate
 
Methods inherited from interface org.zaval.lw.LayoutContainer
count, get, getLayoutOffset
 

Constructor Detail

LwActContainer

public LwActContainer(LwComponent t)
Constructs the container with the specified child component. The child is used to indicate whenever the component has focus.
Parameters:
t - the specified child component.
Method Detail

canHaveFocus

public boolean canHaveFocus()
Description copied from interface: LwComponent
Specifies if the component can have focus.
Specified by:
canHaveFocus in interface LwComponent
Overrides:
canHaveFocus in class LwCanvas
Following copied from interface: org.zaval.lw.LwComponent
Returns:
true if the component can have the focus.

getFocusComponent

public LwComponent getFocusComponent()
Gets the child component that is used to indicate whenever the component has focus.
Returns:
a child focus indicator component.

setAsFocusComponent

public void setAsFocusComponent(int index)
Sets a child focus indicator component by the specified child index. Use -1 value to assign null value to the focus indicator component.
Parameters:
index - the specified child index to be set as the focus indicator.

setRectColor

public void setRectColor(java.awt.Color c)
Sets the specified color to paint rectangle frame around the focus indicator component in case if the container has set focus indicator component.
Parameters:
c - the specified color.

getRectColor

public java.awt.Color getRectColor()
Gets the border color that is used to paint rectangle frame around the focus idicator component.
Returns:
a border color.

catchInput

public boolean catchInput(LwComponent child)
Description copied from interface: LwComposite
Checks if the input event for the specified child component should be caught by the parent.
Specified by:
catchInput in interface LwComposite
Following copied from interface: org.zaval.lw.LwComposite
Parameters:
child - the specified child component.
Returns:
true if input events for the child component should be caught by this component; false otherwise.

paintOnTop

public void paintOnTop(java.awt.Graphics g)
Description copied from interface: LwContainer
Paints additional elements (for example marker) after the container and its child components have been rendered.
Specified by:
paintOnTop in interface LwContainer
Overrides:
paintOnTop in class LwPanel
Following copied from interface: org.zaval.lw.LwContainer
Parameters:
g - the graphics context.

remove

public void remove(int i)
Description copied from interface: LwContainer
Removes the component, specified by the index, from this container. The layout manager of this container should be informed by calling the componentRemoved method of the manager.
Specified by:
remove in interface LwContainer
Overrides:
remove in class LwPanel
Following copied from interface: org.zaval.lw.LwContainer
Parameters:
i - the index of the component to be removed.

removeAll

public void removeAll()
Description copied from interface: LwContainer
Removes all child components from this container. The layout manager of this container should be informed by calling the componentRemoved method of the manager for every child component that has been removed.
Specified by:
removeAll in interface LwContainer
Overrides:
removeAll in class LwPanel

getDefaultLayout

protected LwLayout getDefaultLayout()
Description copied from class: LwPanel
Gets the default layout manager that is set with the container during initialization. This implementation of the method returns LwRastLayout as the default layout manager, the layout manager is got as a static object by "def.lay" key.
Overrides:
getDefaultLayout in class LwPanel
Following copied from class: org.zaval.lw.LwPanel
Returns:
a layout manager.


: up