java.lang.Object
com.memoire.dja.DjaObject
- All Implemented Interfaces:
- java.lang.Cloneable, DjaOptions, DjaOwner, java.io.Serializable
- Direct Known Subclasses:
- DjaForm, DjaLink
- public abstract class DjaObject
- extends java.lang.Object
- implements DjaOwner, DjaOptions, java.lang.Cloneable, java.io.Serializable
| Fields inherited from interface com.memoire.dja.DjaOptions |
ABSOLUTE, anchorsColor, ANY, attachsColor, AUTO, BOTH, CENTER, closeX, closeY, controlsColor, defaultBigFont, defaultBoldFont, defaultPlainFont, defaultSmallFont, deltaX, deltaY, DISK_BG, DISK_EMPTY, DISK_FG, EAST, freesColor, handlesColor, HELPER, HORIZONTAL, LEFT, LEFT_TRIANGLE_BG, LEFT_TRIANGLE_EMPTY, LEFT_TRIANGLE_FG, LOSANGE_BG, LOSANGE_EMPTY, LOSANGE_FG, MIDDLE, NONE, NORTH, NORTH_EAST, NORTH_WEST, RELATIVE_ANCHOR, RELATIVE_ATTACH, RELATIVE_CONTROL, RELATIVE_NE, RELATIVE_NW, RELATIVE_SE, RELATIVE_SW, RELATIVE_TEXT_NE, RELATIVE_TEXT_NW, RELATIVE_TEXT_SE, RELATIVE_TEXT_SW, RIGHT, RIGHT_TRIANGLE_BG, RIGHT_TRIANGLE_EMPTY, RIGHT_TRIANGLE_FG, selectionBackground, selectionForeground, selectionTextColor, selectionZone, snap, SOUTH, SOUTH_EAST, SOUTH_WEST, SQUARE_BG, SQUARE_EMPTY, SQUARE_FG, VERTICAL, WEST |
selected_
private boolean selected_
foreground_
private DjaColor foreground_
background_
private DjaColor background_
color_
private DjaColor color_
font_
private DjaFont font_
texts_
private DjaText[] texts_
properties_
private com.memoire.fu.FuHashtablePublic properties_
owner_
private transient DjaOwner owner_
datas_
private transient com.memoire.fu.FuHashtablePublic datas_
DjaObject
public DjaObject()
getOwner
public DjaOwner getOwner()
- Specified by:
getOwner in interface DjaOwner
setOwner
void setOwner(DjaOwner _owner)
getGrid
public DjaGrid getGrid()
- Specified by:
getGrid in interface DjaOwner
fireGridEvent
public void fireGridEvent(DjaOwner _object,
int _id)
clone
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
- Description copied from class:
java.lang.Object
- This method may be called to create a new copy of the
Object. The typical behavior is as follows:
o == o.clone() is false
o.getClass() == o.clone().getClass()
is true
o.equals(o) is true
However, these are not strict requirements, and may
be violated if necessary. Of the three requirements, the
last is the most commonly violated, particularly if the
subclass does not override Object.equals(Object)>Object.equals(Object) 55 .
If the Object you call clone() on does not implement
java.lang.Cloneable (which is a placeholder interface), then
a CloneNotSupportedException is thrown. Notice that
Object does not implement Cloneable; this method exists
as a convenience for subclasses that do.
Object's implementation of clone allocates space for the
new Object using the correct class, without calling any
constructors, and then fills in all of the new field values
with the old field values. Thus, it is a shallow copy.
However, subclasses are permitted to make a deep copy.
All array types implement Cloneable, and override
this method as follows (it should never fail):
public Object clone()
{
try
{
super.clone();
}
catch (CloneNotSupportedException e)
{
throw new InternalError(e.getMessage());
}
}
getIcon
public javax.swing.Icon getIcon()
getProperty
public java.lang.String getProperty(java.lang.String _key)
putProperty
public void putProperty(java.lang.String _key,
java.lang.String _value)
removeProperty
public void removeProperty(java.lang.String _key)
getData
public java.lang.Object getData(java.lang.String _key)
putData
public void putData(java.lang.String _key,
java.lang.Object _value)
removeData
public void removeData(java.lang.String _key)
getPropertyKeys
java.util.Enumeration getPropertyKeys()
beforeSaving
public void beforeSaving()
afterLoading
public void afterLoading()
getBounds
public abstract java.awt.Rectangle getBounds()
setX
public abstract void setX(int _x)
setY
public abstract void setY(int _y)
setWidth
public abstract void setWidth(int _w)
setHeight
public abstract void setHeight(int _h)
contains
public boolean contains(int _x,
int _y)
getX
public int getX()
getY
public int getY()
getWidth
public int getWidth()
getExtendedBounds
public java.awt.Rectangle getExtendedBounds()
getExtendedBounds
protected java.awt.Rectangle getExtendedBounds(java.awt.Rectangle _r)
getHeight
public int getHeight()
isSelected
public boolean isSelected()
setSelected
public void setSelected(boolean _selected)
getForeground
public java.awt.Color getForeground()
setForeground
public void setForeground(java.awt.Color _foreground)
getBackground
public java.awt.Color getBackground()
setBackground
public void setBackground(java.awt.Color _background)
getAnchors
public DjaAnchor[] getAnchors()
getAttachs
public DjaAttach[] getAttachs()
getHandles
public DjaHandle[] getHandles()
getControls
public DjaControl[] getControls()
getBeginConnections
public DjaLink[] getBeginConnections()
getEndConnections
public DjaLink[] getEndConnections()
getTexts
public DjaText[] getTexts()
getTextArray
protected final DjaText[] getTextArray()
setTextArray
protected final void setTextArray(DjaText[] _texts)
addText
public final void addText(DjaText _text)
addText
public void addText(java.lang.String _text)
textChanged
public void textChanged(DjaText _text)
- Notify when a text was modified
getText
public java.lang.String getText()
- Deprecated. use getText(0)
getText
public java.lang.String getText(int _i)
setText
public void setText(java.lang.String _text)
- Deprecated. use setText(0)
setText
public void setText(java.lang.String _text,
int _i)
getFont
public java.awt.Font getFont()
setFont
public void setFont(java.awt.Font _font)
getColor
public java.awt.Color getColor()
setColor
public void setColor(java.awt.Color _color)
getTextColor
public java.awt.Color getTextColor()
- Deprecated.
setTextColor
public void setTextColor(java.awt.Color _color)
- Deprecated.
getTextPosition
public int getTextPosition()
- Deprecated.
setTextPosition
public void setTextPosition(int _pos)
- Deprecated.
isTextMultiline
public boolean isTextMultiline()
- Deprecated.
setTextBounds
protected void setTextBounds(java.awt.Rectangle _r)
- Deprecated.
paint
public final void paint(java.awt.Graphics _g)
paintObject
public void paintObject(java.awt.Graphics _g)
paintText
public void paintText(java.awt.Graphics _g)
- Deprecated.
paintInteractive
public void paintInteractive(java.awt.Graphics _g)
paintAnchors
public void paintAnchors(java.awt.Graphics _g)
paintAttachs
public void paintAttachs(java.awt.Graphics _g)
paintHandles
public void paintHandles(java.awt.Graphics _g)
paintControls
public void paintControls(java.awt.Graphics _g)
paintTexts
public void paintTexts(java.awt.Graphics _g)
toString
public java.lang.String toString()
- Description copied from class:
java.lang.Object
- Convert this Object to a human-readable String.
There are no limits placed on how long this String
should be or what it should contain. We suggest you
make it as intuitive as possible to be able to place
it into System.out.println() 55
and such.
It is typical, but not required, to ensure that this method
never completes abruptly with a java.lang.RuntimeException.
This method will be called when performing string
concatenation with this object. If the result is
null, string concatenation will instead
use "null".
The default implementation returns
getClass().getName() + "@" +
Integer.toHexString(hashCode()).