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
int ICON_DISPLAYED_FIRST
int NAME_DISPLAYED_FIRST

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

Method Summary
void setValue(String value)
String getValue()
void setProperty(Object property)
Object getProperty()
void setFatherNode(Node father)
Node getFather()
int getMode()
String getIconName()
void setIconName(String iconName)
boolean isVisible()
void setVisible(boolean flag)
void setSelectable(boolean flag)
boolean isSelectable()
boolean equals(Leaf leaf)


Field Detail

ICON_DISPLAYED_FIRST

    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

    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

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

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

Method Detail

setValue

    void setValue(String value)

Sets the label name of the Leaf

Parameters:
value
- the leaf text to set.

getValue

    String getValue()

Returns the label name of the Leaf


setProperty

    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.

getProperty

    Object getProperty()

Return sthe property associated to the Leaf


setFatherNode

    void setFatherNode(Node father)

Sets the father Node of this Leaf

Parameters:
father
- the new father node of this leaf

getFather

    Node getFather()

Returns the father Node of this Leaf


getMode

    int getMode()

Returns the displayed mode of this Leaf


getIconName

    String getIconName()

Returns the icon name associated to this Leaf.


setIconName

    void setIconName(String iconName)

Sets the icon name associated to this Leaf.

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

isVisible

    boolean isVisible()

Determines whether this Leaf is visible in the tree display.


setVisible

    void setVisible(boolean flag)

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

Parameters:
flag
- the boolean visibility flag.

setSelectable

    void setSelectable(boolean flag)

Sets whether or not this leaf can be selected.

Parameters:
flag
- the boolean selection flag.

isSelectable

    boolean isSelectable()

Determines whether this leaf is selectable.


equals

    boolean equals(Leaf leaf)

Compares recursively the equality of two leaves

Parameters:
leaf
- the leaf to compare with this instance


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