|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.4.0) E13403-05 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.javatools.data.HashStructureAdapter oracle.jdeveloper.template.AbstractTemplate
public abstract class AbstractTemplate
Field Summary | |
---|---|
static java.util.Comparator |
NAME_COMPARATOR
|
protected TemplateData |
parent_
|
static java.util.Comparator |
WEIGHT_COMPARATOR
|
Fields inherited from class oracle.javatools.data.HashStructureAdapter |
---|
_hash |
Constructor Summary | |
---|---|
protected |
AbstractTemplate()
|
protected |
AbstractTemplate(HashStructure hash)
|
Method Summary | |
---|---|
int |
compareTo(java.lang.Object o)
|
boolean |
equals(java.lang.Object o)
Equals support. |
Attributes |
getAttributes()
This method returns an Attributes object that encodes the
attributes of the Element . |
java.util.Iterator<Element> |
getChildren()
This method is part of the Element interface to
provide a convenient way of getting an Iterator over any
contained child Element s without having to test the
object's type with the instanceof operator or having
to downcast to a more specific type. |
protected java.lang.String |
getChildTemplatesKey()
|
java.lang.String |
getContainerName()
|
protected abstract java.lang.String |
getContainerNameKey()
|
HashStructure |
getData()
Returns the data object associated with this Element . |
protected abstract javax.swing.Icon |
getDefaultIcon()
|
java.lang.String |
getDeploymentProfile()
|
java.lang.String |
getDescription()
|
java.lang.String |
getGalleryFolder()
|
javax.swing.Icon |
getIcon()
Returns an Icon that can be shown in association with this
Displayable . |
java.lang.String |
getIconFile()
|
java.lang.String |
getLongLabel()
Returns a long label that can be displayed to the user. |
java.lang.String |
getName()
|
java.lang.String |
getPackageName()
|
java.lang.String |
getShortLabel()
Returns a short label that can be displayed to the user. |
TemplateData |
getTemplateData()
The TemplateData container which holds this template. |
java.lang.String |
getTemplateId()
|
static java.lang.String |
getTemplateId(HashStructure hash)
|
protected java.lang.String |
getTextFromHook(HashStructure hash,
java.lang.String key)
|
java.lang.String |
getToolTipText()
Returns the tool tip text to show when the mouse pointer pauses over a UI component that represents this Displayable . |
float |
getWeight()
|
int |
hashCode()
|
void |
initializeFromExtensionHook(HashStructure hash,
TemplateData lookup)
Initialize this template from a HashStructure read from the template extension hook. |
boolean |
isUnsorted()
Indicates whether this item should be sorted by its label or whether it should always sort to the top of the list. |
boolean |
isValid()
|
boolean |
mayHaveChildren()
This method is part of the Element interface to
provide a convenient way of determining whether an object may
have children without having to test the object's type with the
instanceof operator or having to downcast to a
more specific type. |
void |
setContainerName(java.lang.String name)
|
void |
setDeploymentProfile(java.lang.String deploymentProfile)
|
void |
setDescription(java.lang.String desc)
|
void |
setGalleryFolder(java.lang.String category)
|
void |
setIconFile(java.lang.String iconFile)
|
void |
setName(java.lang.String name)
|
void |
setPackageName(java.lang.String name)
|
void |
setTemplateClass(java.lang.String clazz)
|
void |
setTemplateData(TemplateData parent)
The TemplateData container which holds this template. |
static void |
setTemplateId(HashStructure hash,
java.lang.String id)
|
void |
setTemplateId(java.lang.String id)
|
void |
setToolTipText(java.lang.String toolTip)
|
void |
setUnsorted(boolean value)
Determines how this template is sorted in the New Gallery. |
protected void |
setValid(boolean valid)
|
void |
setWeight(float weight)
|
java.lang.String |
toString()
Returns the Short Label displayed to a user. |
protected boolean |
validate()
|
Methods inherited from class oracle.javatools.data.HashStructureAdapter |
---|
addStructureChangeListener, containsKey, copyTo, copyToImpl, equalsImpl, findOrCreate, forcedCopyTo, getHashStructure, removeStructureChangeListener, useObjectEquals |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.util.Comparator NAME_COMPARATOR
public static final java.util.Comparator WEIGHT_COMPARATOR
protected TemplateData parent_
Constructor Detail |
---|
protected AbstractTemplate(HashStructure hash)
protected AbstractTemplate()
Method Detail |
---|
public java.lang.String toString()
Displayable
toString
method in java.lang.Object
.
Implementors of the Displayable
interface should
override this as appropriate. The default implementation is
the same as getShortLabel
toString
in interface Displayable
toString
in class java.lang.Object
Object.toString()
,
Displayable.getShortLabel()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
HashStructureAdapter
HashStructureAdapter._hash
, this base equals implementation should be
sufficient and not need to be overridden.
equals
in class HashStructureAdapter
public void initializeFromExtensionHook(HashStructure hash, TemplateData lookup)
protected java.lang.String getTextFromHook(HashStructure hash, java.lang.String key)
public java.lang.String getTemplateId()
public static java.lang.String getTemplateId(HashStructure hash)
public static void setTemplateId(HashStructure hash, java.lang.String id)
public void setTemplateId(java.lang.String id)
public java.lang.String getName()
public void setName(java.lang.String name)
public java.lang.String getDescription()
public void setDescription(java.lang.String desc)
public java.lang.String getPackageName()
public void setPackageName(java.lang.String name)
public float getWeight()
public void setWeight(float weight)
public java.lang.String getDeploymentProfile()
public void setDeploymentProfile(java.lang.String deploymentProfile)
public java.lang.String getContainerName()
public void setContainerName(java.lang.String name)
public void setUnsorted(boolean value)
value
- true if the items should be sorted to the top
of the list, false otherwisepublic boolean isUnsorted()
public void setGalleryFolder(java.lang.String category)
public java.lang.String getGalleryFolder()
public void setTemplateClass(java.lang.String clazz)
protected java.lang.String getChildTemplatesKey()
protected abstract java.lang.String getContainerNameKey()
protected abstract javax.swing.Icon getDefaultIcon()
public boolean mayHaveChildren()
Element
Element
interface to
provide a convenient way of determining whether an object may
have children without having to test the object's type with the
instanceof
operator or having to downcast to a
more specific type.
An implementation of Element
that represents a leaf
in a tree structure should return false
from this
method. An implementation of Element
that could
represent a non-leaf in a tree structure should return
true
from this method, even if it does not currently
contain any children.
mayHaveChildren
in interface Element
true
if this Element
may contain
child Element
s.public Attributes getAttributes()
Element
Attributes
object that encodes the
attributes of the Element
. Changing the attribute
settings on the return object changes the element attributes.
Subclasses should use their super class attributes object to
define their own attributes. This allows subclasses to
inherit their super class attributes. If a subclass does not
wish to inherit attributes, they should first call
getAttributes().clear()
and define new attributes.
getAttributes
in interface Element
public HashStructure getData()
Element
Element
.
Implementations will often simply return this
, since
the Element is often its own data object.
If the implementation returns an object other than this
,
be sure to set ElementAttributes.DECORATES_DATA_ELEMENT
.
getData
in interface Element
Element
instance.public java.lang.String getShortLabel()
Displayable
String
is considered
translatable and should therefore be placed in an appropriate
resource file. When possible, the returned label should be
reasonably short enough to show in the navigator or explorer
windows but long enough to clearly identify and distinguish the
Displayable
.
getShortLabel
in interface Displayable
Displayable
that can be shown to the user.public java.lang.String getLongLabel()
Displayable
String
is considered translatable
and should therefore be placed in an appropriate resource file.
The long label differs from the short label essentially on length.
Usually the long label will only be shown on-demand and in places
where horizontal space is more available. Examples are the status
bar and tooltips.
getLongLabel
in interface Displayable
Displayable
that
can be shown to the user.public java.util.Iterator<Element> getChildren()
Element
Element
interface to
provide a convenient way of getting an Iterator
over any
contained child Element
s without having to test the
object's type with the instanceof
operator or having
to downcast to a more specific type.
An implementation of Element
that represents a leaf
in a tree structure should return null
from this
method. An implementation of Element
that could
represent a non-leaf in a tree structure should return either an
Iterator
over the child Element
s or
null
if there are no children.
getChildren
in interface Element
Iterator
over any child Element
s
contained by this Element
. If there are no children,
null
is returned.public java.lang.String getIconFile()
public javax.swing.Icon getIcon()
Displayable
Icon
that can be shown in association with this
Displayable
. Typically the icon will be used in a
tree control or list control. Therefore the icon must fit
naturally within the space normally given to items within those
controls. Such icons are usually 16x16 in size or, if there is a
one-pixel transparent padding around the edge, 18x18 in size. It
is strongly recommended that icons returned by this method be
either 16x16 or 18x18 in size. If null
is returned,
the control may show a default icon, or it may show no icon,
whichever is appropriate.
getIcon
in interface Displayable
Icon
to be displayed for the
Displayable
.public void setIconFile(java.lang.String iconFile)
public java.lang.String getToolTipText()
Displayable
Displayable
.
In many cases it may be appropriate for this method to return the
same value as Displayable.getLongLabel()
.
getToolTipText
in interface Displayable
Displayable
.public void setToolTipText(java.lang.String toolTip)
public void setTemplateData(TemplateData parent)
parent
- the TemplateData container.public TemplateData getTemplateData()
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
public boolean isValid()
protected void setValid(boolean valid)
protected boolean validate()
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.4.0) E13403-05 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |