org.mlc.swing.layout
Class ComponentDef
java.lang.Object
org.mlc.swing.layout.ComponentDef
- All Implemented Interfaces:
- java.lang.Comparable<java.lang.Object>
public class ComponentDef
- extends java.lang.Object
- implements java.lang.Comparable<java.lang.Object>
A container class for all the definition data about a Component.
Instances of this class make up the component palette and are
used when creating and editing component data.
- Author:
- Michael Connor
Constructor Summary |
ComponentDef()
|
ComponentDef(org.w3c.dom.Node componentNode)
|
ComponentDef(java.lang.String name,
java.lang.String imp,
java.lang.String decl,
java.lang.String add)
|
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
name
public java.lang.String name
iconClass
public java.lang.String iconClass
icon
public javax.swing.Icon icon
declarations
public java.lang.String declarations
configure
public java.lang.String configure
add
public java.lang.String add
remove
public java.lang.String remove
imports
public java.lang.String imports
preview
public java.lang.String preview
isContainer
public boolean isContainer
ComponentDef
public ComponentDef()
ComponentDef
public ComponentDef(org.w3c.dom.Node componentNode)
ComponentDef
public ComponentDef(java.lang.String name,
java.lang.String imp,
java.lang.String decl,
java.lang.String add)
getDescription
public java.lang.String getDescription()
createComponentDefs
public static java.util.List<ComponentDef> createComponentDefs()
- Creates a new instance of Component Palette. All component configurations
are pulled out of components.xml
getConfigure
public java.lang.String getConfigure(java.lang.String name)
getImports
public java.lang.String getImports(java.lang.String name)
getDeclarations
public java.lang.String getDeclarations(java.lang.String name)
getAdd
public java.lang.String getAdd(java.lang.String name)
clone
public ComponentDef clone()
- When dragging from the palette we need a clone rather than modify
the original.
- Overrides:
clone
in class java.lang.Object
compareTo
public int compareTo(java.lang.Object o)
- Make it sortable on name so the palette is ordered.
- Specified by:
compareTo
in interface java.lang.Comparable<java.lang.Object>
main
public static void main(java.lang.String[] args)