fr.emn.lite
Class LiteLabel

java.lang.Object
  extended byjava.util.AbstractCollection
      extended byjava.util.AbstractList
          extended byfr.emn.lite.Lite
              extended byfr.emn.lite.LiteLabel
All Implemented Interfaces:
java.util.Collection, java.util.List

public class LiteLabel
extends Lite

!! liteLabel has no transform (it displays itself in a rectangle)


Field Summary
protected  java.awt.Rectangle activeBounds
           
protected  int align
           
protected  java.awt.Rectangle bounds
           
protected  java.awt.Font font
           
protected  java.lang.String label
           
protected  java.awt.font.FontRenderContext lastContext
           
protected  boolean layoutUpdated
           
protected static double maxScale
           
static int minAntiAliasedFontSize
           
static int minFontSize
           
protected static double minScale
           
protected static double scaleStep
           
protected  float xOffset
           
protected  float yOffset
           
 
Fields inherited from class fr.emn.lite.Lite
model, oldParent, parent, PICK_ACTIVEBOUNDS, PICK_ALL, PICK_DEEPEST, PICK_FIRST, PICK_GRAPHBOUNDS, PICK_INSIDE, PICK_INTER, PICK_MANIPULABLE, visible
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
LiteLabel(java.lang.String lbl, java.awt.Rectangle bnds, java.awt.Font fnt, int alignment, float yoffset)
           
 
Method Summary
 void doPaint(java.awt.Graphics2D g)
          Include painting code here.
 java.awt.geom.Rectangle2D getActiveBounds()
           
 java.awt.geom.Rectangle2D getBounds()
          Returns the bounds of the Lite object in its own coordinate system.
 java.awt.geom.GeneralPath getGhostPath(int maxDepth)
          This method returns the ghost shape of this object.
 java.awt.Shape getShadow()
          This object does not cast shadows.
 java.lang.String getText()
           
 boolean isTextFullyVisible()
           
 void setText(java.lang.String text)
           
 void translateBounds(double x, double y)
           
 void updateLayout(java.awt.Graphics2D g)
           
 
Methods inherited from class fr.emn.lite.Lite
changeTransform, concatenate, context, dist, equals, get, getActiveBoundsFrom, getAncestor, getAncestor, getBoundsFrom, getBoundsFromNoCorrect, getChildrenGhostPath, getCommonAncestor, getGhost_old, getGhost, getParent, getTransform, getTransformFrom, getTransformNoCopy, isVisible, migrateBack, migrateTo, paint_old, paint, paintChildren, paintShadows, pick, pickChildren, preConcatenate, setContext, setParent, setTransform, setVisible, size, toString, transformBounds
 
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
 
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
 

Field Detail

minScale

protected static double minScale

maxScale

protected static double maxScale

scaleStep

protected static double scaleStep

minFontSize

public static int minFontSize

minAntiAliasedFontSize

public static int minAntiAliasedFontSize

bounds

protected java.awt.Rectangle bounds

activeBounds

protected java.awt.Rectangle activeBounds

label

protected java.lang.String label

align

protected int align

font

protected java.awt.Font font

xOffset

protected float xOffset

yOffset

protected float yOffset

layoutUpdated

protected boolean layoutUpdated

lastContext

protected java.awt.font.FontRenderContext lastContext
Constructor Detail

LiteLabel

public LiteLabel(java.lang.String lbl,
                 java.awt.Rectangle bnds,
                 java.awt.Font fnt,
                 int alignment,
                 float yoffset)
Method Detail

doPaint

public void doPaint(java.awt.Graphics2D g)
Description copied from class: Lite
Include painting code here.

Call PaintChildren if Lite object is a container.

Specified by:
doPaint in class Lite

getActiveBounds

public java.awt.geom.Rectangle2D getActiveBounds()
Overrides:
getActiveBounds in class Lite

getBounds

public java.awt.geom.Rectangle2D getBounds()
Description copied from class: Lite
Returns the bounds of the Lite object in its own coordinate system. Warning : don't change the Rectangle2D returned. Instead, work on a copy.

Specified by:
getBounds in class Lite

getGhostPath

public java.awt.geom.GeneralPath getGhostPath(int maxDepth)
Description copied from class: Lite
This method returns the ghost shape of this object. (implemented here for debug reasons).

By default, this method returns the path iterator of this object's bounds and appends its children's ghost path.

Overrides:
getGhostPath in class Lite
See Also:
#getChildrenGhostPath()

getShadow

public java.awt.Shape getShadow()
This object does not cast shadows.

Overrides:
getShadow in class Lite

getText

public java.lang.String getText()

setText

public void setText(java.lang.String text)

translateBounds

public void translateBounds(double x,
                            double y)

updateLayout

public void updateLayout(java.awt.Graphics2D g)

isTextFullyVisible

public boolean isTextFullyVisible()