Package com.dassault_systemes.catweb.base.util

   
Class Leaf

 
Class Hierarchy
java.lang.Object
  |
  +-com.dassault_systemes.catweb.base.util.Leaf
Class Location

Framework : PortalBase

Module : PLBbase

Class Description

public class Leaf

item of a tree

Field Summary
public static final int ICON_DISPLAYED_FIRST
values for display mode: The default value of display mode is ICON_DISPLAYED_FIRST ICON_DISPLAYED_FIRST : the icon is displayed before the name NAME_DISPLAYED_FIRST : the name is displayed before the icon
public static final int NAME_DISPLAYED_FIRST

Constructor Summary
Leaf(Node father, String value)
Constructs a new Leaf with the specified father Node and label name
Leaf()
Constructs a new Leaf with no father, no icon and an empty label
Leaf(Node father, String value, String iconName, int mode)
Constructs a new Leaf with the specified father Node, label, iconName and with the specified display mode
Leaf(Node father, String value, String iconName, int mode, boolean visible)
Constructs a new Leaf with the specified father Node, label, iconName and with the specified display mode

Method Summary
public boolean equals(Leaf leaf)
Compares recursively the equality of two leaves
public Node getFather()
Returns the father Node of this Leaf
public String getIconName()
Returns the icon name associated to this Leaf.
public int getMode()
Returns the displayed mode of this Leaf
public Object getProperty()
Return sthe property associated to the Leaf
public String getValue()
Returns the label name of the Leaf
public boolean isSelectable()
Determines whether this leaf is selectable.
public boolean isVisible()
Determines whether this Leaf is visible in the tree display.
public void setFatherNode(Node father)
Sets the father Node of this Leaf
public void setIconName(String iconName)
Sets the icon name associated to this Leaf.
public void setProperty(Object property)
Set a property of the Leaf This property is used to store any data associated to the leaf
public void setSelectable(boolean flag)
Sets whether or not this leaf can be selected.
public void setValue(String value)
Sets the label name of the Leaf
public void setVisible(boolean flag)
Shows or hides this leaf depending on the value of parameter flag.


Field Detail

ICON_DISPLAYED_FIRST

    public static final int ICON_DISPLAYED_FIRST
values for display mode: The default value of display mode is ICON_DISPLAYED_FIRST ICON_DISPLAYED_FIRST : the icon is displayed before the name NAME_DISPLAYED_FIRST : the name is displayed before the icon


NAME_DISPLAYED_FIRST

    public static final int NAME_DISPLAYED_FIRST


Constructor Detail

Leaf

    Leaf(Node father, String value)

Constructs a new Leaf with the specified father Node and label name

Parameters:
father
- the father Node of this Leaf
value
- the label name of this Leaf
See Also:
com.dassault_systemes.catweb.base.util.Node

Leaf

    Leaf()

Constructs a new Leaf with no father, no icon and an empty label


Leaf

    Leaf(Node father, String value, String iconName, int mode)

Constructs a new Leaf with the specified father Node, label, iconName and with the specified display mode

Parameters:
father
- the father Node of this Leaf
value
- the label name of this Leaf
iconName
- the name of the icon associated to this Leaf
mode
- the display mode of this Leaf : @see Leaf#ICON_DISPLAYED_FIRST or @see Leaf#NAME_DISPLAYED_FIRST
See Also:
com.dassault_systemes.catweb.base.util.Node

Leaf

    Leaf(Node father, String value, String iconName, int mode, boolean visible)

Constructs a new Leaf with the specified father Node, label, iconName and with the specified display mode

Parameters:
father
- the father Node of this Leaf
value
- the label name of this Leaf
iconName
- the name of the icon associated to this Leaf
mode
- the display mode of this Leaf : @see Leaf#ICON_DISPLAYED_FIRST or @see Leaf#NAME_DISPLAYED_FIRST
visible
- falg for the visibility of the Leaf in the tree view
See Also:
com.dassault_systemes.catweb.base.util.Node

Method Detail

equals

    public boolean equals(Leaf leaf)

Compares recursively the equality of two leaves

Parameters:
leaf
- the leaf to compare with this instance

getFather

    public Node getFather()

Returns the father Node of this Leaf


getIconName

    public String getIconName()

Returns the icon name associated to this Leaf.


getMode

    public int getMode()

Returns the displayed mode of this Leaf


getProperty

    public Object getProperty()

Return sthe property associated to the Leaf


getValue

    public String getValue()

Returns the label name of the Leaf


isSelectable

    public boolean isSelectable()

Determines whether this leaf is selectable.


isVisible

    public boolean isVisible()

Determines whether this Leaf is visible in the tree display.


setFatherNode

    public void setFatherNode(Node father)

Sets the father Node of this Leaf

Parameters:
father
- the new father node of this leaf

setIconName

    public void setIconName(String iconName)

Sets the icon name associated to this Leaf.

Parameters:
iconName
- the name of the icon to associate to this leaf.

setProperty

    public void setProperty(Object property)

Set a property of the Leaf This property is used to store any data associated to the leaf

Parameters:
property
- the property to set.

setSelectable

    public void setSelectable(boolean flag)

Sets whether or not this leaf can be selected.

Parameters:
flag
- the boolean selection flag.

setValue

    public void setValue(String value)

Sets the label name of the Leaf

Parameters:
value
- the leaf text to set.

setVisible

    public void setVisible(boolean flag)

Shows or hides this leaf depending on the value of parameter flag.

Parameters:
flag
- the boolean visibility flag.


Copyright © 2000, Dassault Systèmes. All rights reserved