IDEMPIERE-407 Lookup box on Menu window showing broken images

This commit is contained in:
Carlos Ruiz 2012-08-28 22:56:39 -05:00
parent bbe2febfa9
commit 95e992bbe2
2 changed files with 26 additions and 3 deletions

View File

@ -38,8 +38,7 @@ public final class MTreeNode extends DefaultMutableTreeNode
/**
*
*/
private static final long serialVersionUID = -6046137020835035816L;
private static final long serialVersionUID = 4663753548813509716L;
/**
* Construct Model TreeNode
@ -114,6 +113,19 @@ public final class MTreeNode extends DefaultMutableTreeNode
/** Action - 8 */
public static int TYPE_DOCACTION = 8;
public static String[] PATHS = new String[]
{
null,
"mWindow.png",
"mReport.png",
"mProcess.png",
"mWorkFlow.png",
"mWorkbench.png",
"mSetVariable.png",
"mUserChoice.png",
"mDocAction.png"
};
/** 16* 16 Icons */
public static Icon[] IMAGES = new Icon[]
{
@ -289,6 +301,17 @@ public final class MTreeNode extends DefaultMutableTreeNode
return m_imageIndicator;
} // getImageIndiactor
/**
* Get Image Path
* @return image path
*/
public String getImagePath()
{
if (m_imageIndex == 0 || PATHS == null || m_imageIndex > PATHS.length)
return "/images/Folder16.png";
return "/images/" + PATHS[m_imageIndex];
} // getImageIndiactor
/**
* Get Image Icon
* @param index image index

View File

@ -203,7 +203,7 @@ public class TreeSearchPanel extends Panel implements EventListener<Event>, Tree
MTreeNode mNode = (MTreeNode) sNode.getData();
treeValues[i] = mNode.getName();
treeDescription[i] = mNode.getDescription();
treeImages[i] = mNode.getImageIndiactor();
treeImages[i] = mNode.getImagePath();
}
}