: 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
Interface Layoutable

All Superinterfaces:
Validationable
All Known Subinterfaces:
LayoutContainer, LwComponent, LwComposite, LwContainer, LwDesktop, LwLayer

public interface Layoutable
extends Validationable

This is basic interface for components that are going to be laid out with the library layout managers. The main purpose of the interface is to separate layouting functionality from the lightweight component functionality. It means that it is possible to re-use the set of layout managers provided by the library for any other components that implement the Layoutable interface.


Method Summary
 java.awt.Rectangle getBounds()
          Gets the bounds of this component.
 int getHeight()
          Gets the height of this component.
 java.awt.Insets getInsets()
          Determines the insets of this component.
 java.awt.Point getLocation()
          Gets the location of this component point specifying the component top-left corner.
 java.awt.Dimension getPreferredSize()
          Gets the preferred size of this component.
 java.awt.Dimension getSize()
          Returns a size of this component.
 int getWidth()
          Gets the width of this component.
 int getX()
          Gets the x location of this component specifying the component top-left corner.
 int getY()
          Gets the y location of this component specifying the component top-left corner.
 boolean isVisible()
          Determines if this component is visible.
 void setLocation(int x, int y)
          Sets the new location for this component.
 void setSize(int w, int h)
          Sets the specified size for this component.
 
Methods inherited from interface org.zaval.util.Validationable
invalidate, isValid, validate
 

Method Detail

getLocation

public java.awt.Point getLocation()
Gets the location of this component point specifying the component top-left corner. The location is relative to the parent component coordinate space.
Returns:
an instance of Point representing the top-left corner of the component bounds in the coordinate space of the component parent.

getX

public int getX()
Gets the x location of this component specifying the component top-left corner. The location is relative to the parent component coordinate space.
Returns:
a x coordinate representing the top-left corner of the component bounds in the coordinate space of the component parent.

getY

public int getY()
Gets the y location of this component specifying the component top-left corner. The location is relative to the parent component coordinate space.
Returns:
an y coordinate representing the top-left corner of the component bounds in the coordinate space of the component parent.

getWidth

public int getWidth()
Gets the width of this component.
Returns:
a width of the component.

getHeight

public int getHeight()
Gets the height of this component.
Returns:
a height of the component.

setLocation

public void setLocation(int x,
                        int y)
Sets the new location for this component. The top-left corner of the new location is specified by the x and y parameters in the coordinate space of this component parent.
Parameters:
x - the x-coordinate of the new location top-left corner in the parent's coordinate space.
y - the y-coordinate of the new location top-left corner in the parent's coordinate space.

getSize

public java.awt.Dimension getSize()
Returns a size of this component. The size is represented using the java.awt.Dimension class.
Returns:
a Dimension object that indicates the size of this component.

setSize

public void setSize(int w,
                    int h)
Sets the specified size for this component.
Parameters:
w - the width of this component.
h - the height of this component.

getPreferredSize

public java.awt.Dimension getPreferredSize()
Gets the preferred size of this component. The preferred size is the size that the component wants to have.
Returns:
a dimension object indicating this component preferred size.

isVisible

public boolean isVisible()
Determines if this component is visible. The component is visible if the visibility flag is true.
Returns:
true if the component is visible; false otherwise.

getBounds

public java.awt.Rectangle getBounds()
Gets the bounds of this component. The bounds are represented using the java.awt.Rectangle class.
Returns:
a rectangle indicating this component's bounds.

getInsets

public java.awt.Insets getInsets()
Determines the insets of this component. Take care that insets for lightweight components differ from Java AWT components. The lightweight insets define indents from "left", "top", "right" and "bottom" of the component view.
Returns:
the insets of this component.


: up