org.eevolution.form.bom
Class RadioButtonTreeCellRenderer
java.lang.Object
org.eevolution.form.bom.RadioButtonTreeCellRenderer
- All Implemented Interfaces:
- it.cnr.imaa.essi.lablib.gui.checkboxtree.CheckboxTreeCellRenderer, TreeCellRenderer
public class RadioButtonTreeCellRenderer
- extends Object
- implements it.cnr.imaa.essi.lablib.gui.checkboxtree.CheckboxTreeCellRenderer
|
Method Summary |
DefaultMutableTreeNode |
action_loadBOM(X_M_Product Product,
boolean setRoot)
Action: Fill Tree with all nodes |
DefaultMutableTreeNode |
component(X_M_Product M_Product,
X_PP_Product_BOM bomPassed,
X_PP_Product_BOMLine bomlinePassed)
|
protected TreePath[] |
getChildrenPath(TreePath path,
TreeModel model)
|
String |
getComponentTypeUsingBOMParent(int bom_id,
int m_product_id)
|
TreePath |
getPath(TreeNode node)
|
Component |
getTreeCellRendererComponent(JTree tree,
Object value,
boolean selected,
boolean expanded,
boolean leaf,
int row,
boolean hasFocus)
This method is redeclared just to underline that the implementor has
to properly display the checking/graying state of value. |
DefaultMutableTreeNode |
getTreeNodeForNodeUserObject(nodeUserObject m_nodeUserObject)
|
boolean |
isOnHotspot(int x,
int y)
Returns whether the specified relative coordinates insist on the
intended checkbox control. |
static void |
main(String[] args)
|
DefaultMutableTreeNode |
parent(X_PP_Product_BOM bom)
|
DefaultMutableTreeNode |
parent(X_PP_Product_BOMLine bomline)
|
static void |
printDescendents(TreeNode root)
|
void |
printTree(TreePath path,
TreeModel model,
it.cnr.imaa.essi.lablib.gui.checkboxtree.TreeCheckingModel checkingModel)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
root
public DefaultMutableTreeNode root
checkedPathsSet
public HashSet<TreePath> checkedPathsSet
greyedPathsSet
public HashSet<TreePath> greyedPathsSet
disabledPathsSet
public HashSet<TreePath> disabledPathsSet
checkBoxPathsSet
public HashSet<TreePath> checkBoxPathsSet
RadioButtonTreeCellRenderer
public RadioButtonTreeCellRenderer()
getTreeNodeForNodeUserObject
public DefaultMutableTreeNode getTreeNodeForNodeUserObject(nodeUserObject m_nodeUserObject)
printDescendents
public static void printDescendents(TreeNode root)
action_loadBOM
public DefaultMutableTreeNode action_loadBOM(X_M_Product Product,
boolean setRoot)
- Action: Fill Tree with all nodes
parent
public DefaultMutableTreeNode parent(X_PP_Product_BOMLine bomline)
parent
public DefaultMutableTreeNode parent(X_PP_Product_BOM bom)
component
public DefaultMutableTreeNode component(X_M_Product M_Product,
X_PP_Product_BOM bomPassed,
X_PP_Product_BOMLine bomlinePassed)
isOnHotspot
public boolean isOnHotspot(int x,
int y)
- Description copied from interface:
it.cnr.imaa.essi.lablib.gui.checkboxtree.CheckboxTreeCellRenderer
- Returns whether the specified relative coordinates insist on the
intended checkbox control. May be used by a mouse listener to figure
out whether to toggle a node or not.
- Specified by:
isOnHotspot in interface it.cnr.imaa.essi.lablib.gui.checkboxtree.CheckboxTreeCellRenderer
getChildrenPath
protected TreePath[] getChildrenPath(TreePath path,
TreeModel model)
getPath
public TreePath getPath(TreeNode node)
printTree
public void printTree(TreePath path,
TreeModel model,
it.cnr.imaa.essi.lablib.gui.checkboxtree.TreeCheckingModel checkingModel)
getComponentTypeUsingBOMParent
public String getComponentTypeUsingBOMParent(int bom_id,
int m_product_id)
getTreeCellRendererComponent
public Component getTreeCellRendererComponent(JTree tree,
Object value,
boolean selected,
boolean expanded,
boolean leaf,
int row,
boolean hasFocus)
- Description copied from interface:
it.cnr.imaa.essi.lablib.gui.checkboxtree.CheckboxTreeCellRenderer
- This method is redeclared just to underline that the implementor has
to properly display the checking/graying state of
value.
This should go in the method parameters, but would imply changes to
Swing classes that were considered unpractical. For example in
DefaultCheckboxTreeCellRenderer the following code is used to get the
checking/graying states:
TreeCheckingModel checkingModel = ((CheckboxTree) tree).getCheckingModel();
TreePath path = tree.getPathForRow(row);
boolean enabled = checkingModel.isPathEnabled(path);
boolean checked = checkingModel.isPathChecked(path);
boolean greyed = checkingModel.isPathGreyed(path);
You could use a QuadristateCheckbox to properly renderer the states
(as in DefaultCheckboxTreeCellRenderer).
- Specified by:
getTreeCellRendererComponent in interface it.cnr.imaa.essi.lablib.gui.checkboxtree.CheckboxTreeCellRenderer- Specified by:
getTreeCellRendererComponent in interface TreeCellRenderer
- See Also:
TreeCellRenderer.getTreeCellRendererComponent(javax.swing.JTree, java.lang.Object, boolean, boolean, boolean, int, boolean)
main
public static void main(String[] args)
Adempiere® is a registered trademark of ADempiere Business Inc. ©2004-2008 HumanFlash.com All rights reserved.