(In fact it must be granted
CheckComponent.height() <= Description.height)
Internal implementation:
Like in BorderLayout in the JDK I have implemented identifiers which
describe the "kind" of a Component in the NodeContainer. They don't
call "South" "West" but :
"stdNode"
"description"
"check"
"thischeck"
The identifier "stdNode" describes all Components which are "add"
with the normal Mehtod : add(Component comp) to the NodeContainer.
I have overloaded this Method in NodeContainer. It simply invokes
add("stdNode",comp)
Thus these are the "contents" of the Container.
(In a FileNodeLayout these are the File-Names)
The identifiers "description" and "check" describe Components which
are for the graphical representation of the NodeContainer itself.
The "check" allows to hide/show the "stNode" Components and
the "description" Component is "its description-Name".
(In a FileNodeLayout the name of the directory)
The "thischeck" describes the Checkbox of the NodeContainer to which
this Layout belongs.
Note:
the "thischeck" is only in the Conatiner if and only if the this
NodeContainer has nor parent NodeContainer. Thus the "thischeck"
is only a member of the NodeContainer if it is the "root" NodeContainer.
Depending ob the Status getpaint() we draw this "root"-Checkbox or not.
-
FileNodeLayout()
- Constructs a new FileNodeLayout with standard-spacing
-
FileNodeLayout(int, int, int, int)
- Constructs a new FileNodeLayout with the specified gap values
-
addLayoutComponent(String, Component)
- Adds the specified component to the layout.
-
layoutContainer(Container)
- Lays out the container.
-
minimumLayoutSize(Container)
- Returns the minimum dimensions needed to layout the components
contained in the specified target container.
-
preferredLayoutSize(Container)
- Returns the preferred dimensions for this layout given the components
in the specified target container.
-
removeLayoutComponent(Component)
- Removes the specified component from the layout.
-
toString()
- Returns the String representation of this FileNodeLayout's values.
FileNodeLayout
public FileNodeLayout()
- Constructs a new FileNodeLayout with standard-spacing
FileNodeLayout
public FileNodeLayout(int hgap1,
int hgap2,
int vgap1,
int hgapRoot)
- Constructs a new FileNodeLayout with the specified gap values
- Parameters:
- hgap1 - the "left" horizontal gab variable
- hgap2 - the "right" horizontal gap variable
- vgap1 - the vertical gap variable
addLayoutComponent
public void addLayoutComponent(String name,
Component comp)
- Adds the specified component to the layout. Not used by this class.
- Parameters:
- name - the name of the component
- comp - the the component to be added
removeLayoutComponent
public void removeLayoutComponent(Component comp)
- Removes the specified component from the layout. Not used by
this class.
- Parameters:
- comp - the component to remove
preferredLayoutSize
public Dimension preferredLayoutSize(Container target)
- Returns the preferred dimensions for this layout given the components
in the specified target container.
Note: The target must be a NodeContainer (!)
- Parameters:
- target - the component which needs to be laid out
- See Also:
- Container, minimumLayoutSize
minimumLayoutSize
public Dimension minimumLayoutSize(Container target)
- Returns the minimum dimensions needed to layout the components
contained in the specified target container.
Note: The parameter is a NodeContainer
(and we call preferredLayoutSize...)
- Parameters:
- target - the component which needs to be laid out
- See Also:
- preferredLayoutSize
layoutContainer
public void layoutContainer(Container target)
- Lays out the container. This method will actually reshape the
components in the target in order to satisfy the constraints of
the FileNodeLayout object.
Note: The parameter must be a NodeContainer (!)
- Parameters:
- target - the specified component being laid out.
- See Also:
- Container
toString
public String toString()
- Returns the String representation of this FileNodeLayout's values.
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index