Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

jpicedt.graphic.model
Class PicText  view PicText download PicText.java

java.lang.Object
  extended byjpicedt.graphic.model.AbstractElement
      extended byjpicedt.graphic.model.TextEditable
          extended byjpicedt.graphic.model.PicText
All Implemented Interfaces:
jpicedt.graphic.toolkit.CustomizerFactory, Element, PicObjectConstants

public class PicText
extends TextEditable
implements jpicedt.graphic.toolkit.CustomizerFactory

Textual elements, possibly surrounded by a box (currently, only rectangular, oval and circular shapes are supported). The box size is computed from the text size (i.e. aka LaTeX's \\framebox command with no width/height argument).

Since:
PicEdt 1.0

Nested Class Summary
(package private)  class PicText.Customizer
          geometry customizer
 
Nested classes inherited from class jpicedt.graphic.model.AbstractElement
AbstractElement.DefaultPointIterator
 
Nested classes inherited from class jpicedt.graphic.model.Element
Element.PointIterator
 
Field Summary
static java.lang.String BASELINE
           
static java.lang.String BOTTOM
           
static java.lang.String CENTER_H
           
static java.lang.String CENTER_V
           
static java.lang.String CIRCLE
           
private  java.lang.String frameType
           
private  java.lang.String horAlign
           
static java.lang.String LEFT
           
static java.lang.String NO_FRAME
           
static java.lang.String OVAL
           
static java.lang.String RECTANGLE
           
static java.lang.String RIGHT
           
static java.lang.String TOP
           
private  java.lang.String vertAlign
           
 
Fields inherited from class jpicedt.graphic.model.TextEditable
FIRST_PT, LAST_PT, P_ANCHOR, textString
 
Fields inherited from class jpicedt.graphic.model.AbstractElement
attributeSet, parent, ptsX, ptsY, view
 
Fields inherited from interface jpicedt.graphic.model.PicObjectConstants
CROSSHATCH, CROSSHATCH_FILLED, DASH_OPAQUE, DASH_TRANSPARENT, DASH1, DASH2, DASH3, DASHED, DIMEN, DOT_SEP, DOT_SEP1, DOT_SEP2, DOT_SEP3, DOTTED, DOUBLE_COLOR, DOUBLE_LINE, DOUBLE_SEP, FILL_COLOR, FILL_STYLE, HATCH_ANGLE, HATCH_COLOR, HATCH_SEP, HATCH_WIDTH, HLINES, HLINES_FILLED, INNER, LEFT_ARROW, LINE_COLOR, LINE_STYLE, LINE_WIDTH, MaxAttributeNameIndex, MIDDLE, NONE, OUTER, POLYGON_DOTS, POLYGON_SOLID, POLYGON_STYLE, PS_POINT, RIGHT_ARROW, SHADOW, SHADOW_ANGLE, SHADOW_COLOR, SHADOW_SIZE, SOLID, VLINES, VLINES_FILLED
 
Constructor Summary
PicText()
          Creates a PicText object with a default attribute set, and the following default values :
- empty string,
- no frame,
- bottom-left alignment.
and anchor point at (0,0)
PicText(PicAttributeSet set)
          Creates a PicText object with the following default values :
- empty string,
- no frame,
- bottom-left alignment.
and anchor point at (0,0)
PicText(jpicedt.graphic.PicPoint ptA, PicAttributeSet set)
          Creates a PicText object with the following default values :
- empty string,
- no frame,
- bottom-left alignment.
PicText(jpicedt.graphic.PicPoint ptA, java.lang.String textString, java.lang.String frameType, java.lang.String horAlign, java.lang.String vertAlign, PicAttributeSet set)
          Create a new PicText object with the whole bunch of parameters !
PicText(PicText text)
          cloning constructor
 
Method Summary
 java.lang.Object clone()
          Override Object.clone() method
 jpicedt.graphic.toolkit.AbstractCustomizer createCustomizer()
           
 java.lang.String getFrameType()
          Set the frame type
 java.lang.String getHorAlign()
           
 java.lang.String getName()
          Returns a non-localised string representing this object's name This default implementation returns the class name.
 java.lang.String getVertAlign()
           
 boolean isFramed()
           
 void setFrameType(java.lang.String frameType)
          Set the frame type
 void setHorAlign(java.lang.String horAlign)
          set the horizontal alignment (see static fields above)
 void setVertAlign(java.lang.String vertAlign)
          set the vertical alignement (see static fields above)
 java.lang.String toString()
          Returns a String representation of the attribute set for this AbstractElement
 
Methods inherited from class jpicedt.graphic.model.TextEditable
getBoundingBox, getText, setText
 
Methods inherited from class jpicedt.graphic.model.AbstractElement
anchorPointsIterator, fireChangedUpdate, getAttribute, getAttributeSet, getBoundingBox, getDrawing, getFirstPointIndex, getLastPointIndex, getParent, getPoint, getPointX, getPointY, getView, removeView, scale, scale, setAttribute, setAttributeSet, setParent, setPoint, setViewFromFactory, translate
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

BOTTOM

public static final java.lang.String BOTTOM
See Also:
Constant Field Values

BASELINE

public static final java.lang.String BASELINE
See Also:
Constant Field Values

CENTER_V

public static final java.lang.String CENTER_V
See Also:
Constant Field Values

TOP

public static final java.lang.String TOP
See Also:
Constant Field Values

LEFT

public static final java.lang.String LEFT
See Also:
Constant Field Values

CENTER_H

public static final java.lang.String CENTER_H
See Also:
Constant Field Values

RIGHT

public static final java.lang.String RIGHT
See Also:
Constant Field Values

NO_FRAME

public static final java.lang.String NO_FRAME
See Also:
Constant Field Values

RECTANGLE

public static final java.lang.String RECTANGLE
See Also:
Constant Field Values

CIRCLE

public static final java.lang.String CIRCLE
See Also:
Constant Field Values

OVAL

public static final java.lang.String OVAL
See Also:
Constant Field Values

vertAlign

private java.lang.String vertAlign

horAlign

private java.lang.String horAlign

frameType

private java.lang.String frameType
Constructor Detail

PicText

public PicText(jpicedt.graphic.PicPoint ptA,
               java.lang.String textString,
               java.lang.String frameType,
               java.lang.String horAlign,
               java.lang.String vertAlign,
               PicAttributeSet set)
Create a new PicText object with the whole bunch of parameters !

Since:
PicEdt 1.0

PicText

public PicText(jpicedt.graphic.PicPoint ptA,
               PicAttributeSet set)
Creates a PicText object with the following default values :
- empty string,
- no frame,
- bottom-left alignment.

Since:
PicEdt 1.0

PicText

public PicText(PicAttributeSet set)
Creates a PicText object with the following default values :
- empty string,
- no frame,
- bottom-left alignment.
and anchor point at (0,0)

Since:
PicEdt 1.0

PicText

public PicText()
Creates a PicText object with a default attribute set, and the following default values :
- empty string,
- no frame,
- bottom-left alignment.
and anchor point at (0,0)

Since:
PicEdt 1.0

PicText

public PicText(PicText text)
cloning constructor

Since:
PicEdt 1.0
Method Detail

clone

public java.lang.Object clone()
Override Object.clone() method

Specified by:
clone in interface Element
Specified by:
clone in class AbstractElement
Since:
PicEdt 1.0

getName

public java.lang.String getName()
Description copied from class: AbstractElement
Returns a non-localised string representing this object's name This default implementation returns the class name.

Specified by:
getName in interface Element
Overrides:
getName in class AbstractElement

getHorAlign

public java.lang.String getHorAlign()
Since:
PicEdt 1.0

setHorAlign

public void setHorAlign(java.lang.String horAlign)
set the horizontal alignment (see static fields above)

Since:
PicEdt 1.0

getVertAlign

public java.lang.String getVertAlign()
Since:
PicEdt 1.0

setVertAlign

public void setVertAlign(java.lang.String vertAlign)
set the vertical alignement (see static fields above)

Since:
PicEdt 1.0

isFramed

public boolean isFramed()
Since:
PicEdt 1.0

setFrameType

public void setFrameType(java.lang.String frameType)
Set the frame type

Since:
PicEdt 1.0

getFrameType

public java.lang.String getFrameType()
Set the frame type

Since:
PicEdt 1.0

toString

public java.lang.String toString()
Description copied from class: AbstractElement
Returns a String representation of the attribute set for this AbstractElement

Overrides:
toString in class AbstractElement

createCustomizer

public jpicedt.graphic.toolkit.AbstractCustomizer createCustomizer()
Specified by:
createCustomizer in interface jpicedt.graphic.toolkit.CustomizerFactory