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

Quick Search    Search Deep

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

java.lang.Object
  extended byjpicedt.graphic.model.AbstractElement
      extended byjpicedt.graphic.model.BranchElement
          extended byjpicedt.graphic.model.PicGroup
All Implemented Interfaces:
java.util.Collection, jpicedt.graphic.toolkit.CustomizerFactory, Element, java.lang.Iterable, PicObjectConstants

public class PicGroup
extends BranchElement
implements jpicedt.graphic.toolkit.CustomizerFactory

A concrete implementation of BranchElement that is suited for building groups of elements. It allows easy global resize/translate transformation by providing 8 control points that can be used by mouse operation.

Since:
PicEdt 1.0

Nested Class Summary
(package private)  class PicGroup.Customizer
          geometry customizer
 class PicGroup.GroupPointIterator
          An iterator over PicPoint's that can serve as anchors for grid alignment.
 
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 int FIRST_PT
           
static int LAST_PT
           
static int LL
           
static int LM
           
static int LR
           
static int ML
           
static int MR
           
static int UL
           
static int UM
           
static int UR
           
 
Fields inherited from class jpicedt.graphic.model.BranchElement
changeLock, children
 
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
PicGroup()
          construct a PicGroup with no parent and a default PicAttributeSet
PicGroup(BranchElement src)
          Cloning constructor.
PicGroup(java.util.Collection c)
          Simply call superclass's constructor.
PicGroup(PicAttributeSet attributeSet)
          construct a PicGroup with no parent and the given PicAttributeSet
 
Method Summary
 Element.PointIterator anchorPointsIterator()
          Create an Iterator over points that can serve as anchor points for grid alignment.
 java.lang.Object clone()
          Return a deep copy of this PicGroup
 jpicedt.graphic.toolkit.AbstractCustomizer createCustomizer()
           
 int getFirstPointIndex()
          Returns the index of the first point that can be retrieved by getPoint This default implementation returns 0.
 int getLastPointIndex()
          Returns the index of the last point that can be retrieved by getPoint This default implementation returns the greater index allowed in ptsX (or ptsY).
 java.lang.String getName()
          Returns a non-localised string representing this object's name This default implementation returns the class name.
 double getPointX(int numPoint)
          This default implementation returns ptsX[numPoint].
 double getPointY(int numPoint)
          This default implementation returns ptsY[numPoint].This might be a valid implementation as long as subclasses don't have other control points.
 void setPoint(int numPoint, jpicedt.graphic.PicPoint ptNew)
          Set the point numbered by "numPoint" to the "pt" value, and scales inward object accordingly
 java.lang.String toString()
          Returns a String representing the group for debugging use only.
 
Methods inherited from class jpicedt.graphic.model.BranchElement
add, addAll, addChild, addChild, bringBackward, bringForward, bringToBack, bringToFront, children, clear, contains, contains, containsAll, equals, forwardChangedUpdate, getBoundingBox, getChildAt, getChildCount, getChildIndex, isEmpty, isToBack, isToFront, iterator, remove, removeAll, removeAllChildren, removeChild, removeView, replaceChild, retainAll, scale, scale, setAttribute, setAttributeSet, setViewFromFactory, size, toArray, toArray, translate, updateBoundingBox
 
Methods inherited from class jpicedt.graphic.model.AbstractElement
fireChangedUpdate, getAttribute, getAttributeSet, getDrawing, getParent, getPoint, getView, setParent
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Collection
hashCode
 

Field Detail

FIRST_PT

public static final int FIRST_PT
See Also:
Constant Field Values

UL

public static final int UL
See Also:
Constant Field Values

UM

public static final int UM
See Also:
Constant Field Values

UR

public static final int UR
See Also:
Constant Field Values

ML

public static final int ML
See Also:
Constant Field Values

MR

public static final int MR
See Also:
Constant Field Values

LL

public static final int LL
See Also:
Constant Field Values

LM

public static final int LM
See Also:
Constant Field Values

LR

public static final int LR
See Also:
Constant Field Values

LAST_PT

public static final int LAST_PT
See Also:
Constant Field Values
Constructor Detail

PicGroup

public PicGroup()
construct a PicGroup with no parent and a default PicAttributeSet


PicGroup

public PicGroup(PicAttributeSet attributeSet)
construct a PicGroup with no parent and the given PicAttributeSet


PicGroup

public PicGroup(BranchElement src)
Cloning constructor. Simply call superclass's constructor.


PicGroup

public PicGroup(java.util.Collection c)
Simply call superclass's constructor.

Method Detail

clone

public java.lang.Object clone()
Return a deep copy of this PicGroup

Specified by:
clone in interface Element
Specified by:
clone in class BranchElement
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

getFirstPointIndex

public int getFirstPointIndex()
Description copied from class: AbstractElement
Returns the index of the first point that can be retrieved by getPoint This default implementation returns 0.

Specified by:
getFirstPointIndex in interface Element
Overrides:
getFirstPointIndex in class BranchElement

getLastPointIndex

public int getLastPointIndex()
Description copied from class: AbstractElement
Returns the index of the last point that can be retrieved by getPoint This default implementation returns the greater index allowed in ptsX (or ptsY).

Specified by:
getLastPointIndex in interface Element
Overrides:
getLastPointIndex in class BranchElement

getPointX

public double getPointX(int numPoint)
Description copied from class: AbstractElement
This default implementation returns ptsX[numPoint]. This might be a valid implementation as long as subclasses don't have other control points.

Specified by:
getPointX in interface Element
Overrides:
getPointX in class BranchElement
Since:
PicEdt 1.0

getPointY

public double getPointY(int numPoint)
Description copied from class: BranchElement
This default implementation returns ptsY[numPoint].This might be a valid implementation as long as subclasses don't have other control points.

Specified by:
getPointY in interface Element
Overrides:
getPointY in class BranchElement
Since:
PicEdt 1.0

setPoint

public void setPoint(int numPoint,
                     jpicedt.graphic.PicPoint ptNew)
Set the point numbered by "numPoint" to the "pt" value, and scales inward object accordingly

Specified by:
setPoint in interface Element
Overrides:
setPoint in class BranchElement
Since:
PicEdt 1.0

anchorPointsIterator

public Element.PointIterator anchorPointsIterator()
Description copied from class: AbstractElement
Create an Iterator over points that can serve as anchor points for grid alignment. This implementation returns a default PointIterator which simply iterates through control points.

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

toString

public java.lang.String toString()
Returns a String representing the group for debugging use only.

Overrides:
toString in class BranchElement

createCustomizer

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