📄 jbtreenode.java
字号:
/*
* OPIAM Suite
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package opiam.admin.faare.service.services.views;
import opiam.admin.faare.config.javabeans.JBLevelRessource;
import opiam.admin.faare.persistence.javabeans.JBTop;
import java.util.ArrayList;
import java.util.List;
/**
* This class allows to specify a node of a view.
*
*/
public class JBTreeNode
{
/** State of the node: unexpanded. */
public static final int UNEXPANDED = 0;
/** State of the node: expanded. */
public static final int EXPANDED = 1;
/** State of the node: no children. */
public static final int NOCHILDREN = 2;
/** State of the node: closed. */
public static final int CLOSE = 3;
/** Label URL of the node. */
private String openUrl;
/** Label to display. */
private String label;
/** Path of the icon to display. */
private String icon;
/** JBTop corresponding to the node. */
private JBTop jbTop;
/** Identifier of the node. */
private int id;
/** Extension URL of the node. */
private String expandUrl;
/** State of the node (UNEXPANDED,EXPANDED,NOCHILDREN,CLOSE). */
private int state;
/** Attributes list to display for a flowchart. */
private List listOrgChartAtt = new ArrayList();
/** JBTreeNode parent. */
private JBTreeNode parent;
//DEBUT MODIF CCT 19/07/04 関olutions sur les vues
/** JBLevelRessource corresponding to the node. */
private JBLevelRessource jbLevelRessource;
//FIN MODIF CCT 19/07/04 関olutions sur les vues
//DW/2629/BeginPatch
/** Node level. */
private int level;
//DW/2629/EndPatch
//DW/2667/BeginPatch
/** Property indicating where to open the target URL. */
private String target;
//DW/2667/EndPatch
/**
* Creates a new JBTreeNode object.
*
* @param anId Identifier of the node.
* @param anExpUrl Extension URL of the node.
* @param anOpUrl Label URL of the node.
* @param aLabel Label to display.
* @param anIcon Path of the icon to display.
* @param aState State of the node (UNEXPANDED,EXPANDED,NOCHILDREN,CLOSE).
*/
public JBTreeNode(int anId, String anExpUrl, String anOpUrl, String aLabel,
String anIcon, int aState)
{
setId(anId);
setExpandUrl(anExpUrl);
setOpenUrl(anOpUrl);
setLabel(aLabel);
setIcon(anIcon);
setState(aState);
}
//DW/2667/BeginPatch
/**
* Creates a new JBTreeNode object.
*
* @param anId Identifier of the node.
* @param anExpUrl Extension URL of the node.
* @param anOpUrl Label URL of the node.
* @param aLabel Label to display.
* @param anIcon Path of the icon to display.
* @param aState State of the node (UNEXPANDED,EXPANDED,NOCHILDREN,CLOSE).
* @param aTarget Target of the URL label.
*/
public JBTreeNode(int anId, String anExpUrl, String anOpUrl, String aLabel,
String anIcon, int aState, String aTarget)
{
setId(anId);
setExpandUrl(anExpUrl);
setOpenUrl(anOpUrl);
setLabel(aLabel);
setIcon(anIcon);
setState(aState);
setTarget(aTarget);
}
//DW/2667/EndPatch
/**
* Creates a new JBTreeNode object.
*/
public JBTreeNode()
{
}
/**
* Sets the identifier of the node.
*
* @param anId The identifier to set.
*/
public void setId(int anId)
{
id = anId;
}
/**
* Sets the expandUrl.
*
* @param anUrl The expandUrl to set.
*/
public void setExpandUrl(String anUrl)
{
expandUrl = anUrl;
}
/**
* Sets the label URL.
*
* @param anUrl The openUrl to set.
*/
public void setOpenUrl(String anUrl)
{
openUrl = anUrl;
}
/**
* Sets the label of the node.
*
* @param aLabel The label to set.
*/
public void setLabel(String aLabel)
{
label = aLabel;
}
/**
* Sets the icon of the node.
*
* @param anIcon The icon url to set.
*/
public void setIcon(String anIcon)
{
icon = anIcon;
}
/**
* Sets the state of the node.
*
* @param aState The state to set.
*/
public void setState(int aState)
{
state = aState;
}
/**
* Returns the identifier of the node.
*
* @return The identifier.
*/
public int getId()
{
return id;
}
/**
* Returns the expandable Url.
*
* @return The expandable Url.
*/
public String getExpandUrl()
{
return expandUrl;
}
/**
* Returns the label Url.
*
* @return The open url.
*/
public String getOpenUrl()
{
return openUrl;
}
/**
* Returns the label.
*
* @return The label of the node.
*/
public String getLabel()
{
return label;
}
/**
* Returns the icon Url.
*
* @return The icon url.
*/
public String getIcon()
{
return icon;
}
/**
* Returns the state of the node.
*
* @return The state : 0 => UNEXPANDED; 1 => EXPANDED; 2 => NOCHILDREN;
* 3 => CLOSE.
*/
public int getState()
{
return state;
}
/**
* Returns the JBTop object.
*
* @return The JBTop object.
*/
public JBTop getJbTop()
{
return jbTop;
}
/**
* Sets the JBTop object.
*
* @param ajbTop The JBTop object to set.
*/
public void setJbTop(JBTop ajbTop)
{
this.jbTop = ajbTop;
}
/**
* Returns the parent of the node.
*
* @return The parent node.
*/
public JBTreeNode getParent()
{
return parent;
}
/**
* Sets the parent of the node.
*
* @param aparent The JBTreeNode parent to set.
*/
public void setParent(JBTreeNode aparent)
{
this.parent = aparent;
}
/**
* Returns the listOrgChartAtt.
*
* @return The listOrgChartAtt.
*/
public List getListOrgChartAtt()
{
return listOrgChartAtt;
}
/**
* Sets the listOrgChartAtt.
*
* @param alistOrgChartAtt The listOrgChartAtt to set.
*/
public void setListOrgChartAtt(List alistOrgChartAtt)
{
this.listOrgChartAtt = alistOrgChartAtt;
}
// DEBUT MODIF CCT 19/07/04 関olutions sur les vues
/**
* Returns the JBLevelRessource.
*
* @return The JBLevelRessource.
*/
public JBLevelRessource getJbLevelRessource()
{
return jbLevelRessource;
}
/**
* Sets the JBLevelRessource.
*
* @param ajbLevelRessource The jbLevelRessource to set.
*/
public void setJbLevelRessource(JBLevelRessource ajbLevelRessource)
{
this.jbLevelRessource = ajbLevelRessource;
}
//DW/2629/BeginPatch
/**
* Sets node level.
* @param value level
*/
public void setLevel(int value)
{
level = value;
}
/**
* Gets node level.
* @return level
*/
public int getLevel()
{
return level;
}
//DW/2629/EndPatch
// FIN MODIF CCT 19/07/04 関olutions sur les vues
//DW/2667/BeginPatch
/**
* Gets the location indicator of the target URL.
*
* @return The target or null.
*/
public String getTarget() {
return target;
}
/**
* Sets the location indicator of the target URL.
*
* @param target The target to set.
*/
public void setTarget(String target) {
this.target = target;
}
//DW/2667/EndPatch
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -