http://www.jpicedt.org

jpicedt.graphic.model
Class Drawing.BoundingBox

java.lang.Object
  extended by jpicedt.graphic.model.AbstractElement
      extended by jpicedt.graphic.model.PicParallelogram
          extended by jpicedt.graphic.model.Drawing.BoundingBox
All Implemented Interfaces:
Element, PicMultiCurveConvertable, ActionFactory, CustomizerFactory
Enclosing class:
Drawing

public class Drawing.BoundingBox
extends PicParallelogram


Field Summary
 
Fields inherited from class jpicedt.graphic.model.PicParallelogram
b2tVec, CTRL_PT_SIDE_BITMAP, FIRST_PT, IN_SIDE_B, IN_SIDE_L, IN_SIDE_R, IN_SIDE_T, l2rVec, LAST_PT, P_BL, P_BR, P_CENTER, P_TL, P_TR, ptBL, ptBR, ptTR, SIDE_0, SIDE_B, SIDE_L, SIDE_R, SIDE_T
 
Fields inherited from class jpicedt.graphic.model.AbstractElement
attributeSet, name, parent, view
 
Constructor Summary
Drawing.BoundingBox()
           
Drawing.BoundingBox(Drawing.BoundingBox bb)
          "cloning" constructor (to be used by clone())
 
Method Summary
 Drawing.BoundingBox clone()
          Overrides Object.clone() method
 ArrayList<PEAction> createActions(ActionDispatcher actionDispatcher, ActionLocalizer localizer, HitInfo hi)
          Create an array of Action's related to this object
 AbstractCustomizer createCustomizer()
          Returns a customizer (Swing) component
protected  void fireChangedUpdate(DrawingEvent.EventType eventType)
          Must be called each time this AbstractElement changes.
 String getDefaultName()
           
 Drawing getDrawing()
          Retrieves the underlying drawing
 String getName()
          Return a non-localised string representing this element's name.
 BranchElement getParent()
          Gets the parent of the element.
 View getView()
          Returns the View that's responsible for rendering this AbstractElement
 boolean isAutoCompute()
           
 boolean isVisible()
           
 void mirror(PicPoint ptOrg, PicVector normalVector)
          Effectue une réflexion sur this relativement à l'axe défini par ptOrg et normalVector.
 void rotate(PicPoint ptOrg, double angle)
          Rotate this Element by the given angle along the given point
<T> void
setAttribute(PicAttributeName<T> name, T value)
          Set the given attribute name to the given value for this AbstractElement
 void setAttributeSet(PicAttributeSet attributeSet)
          Bind the given attributes set to this Element.
 void setAutoCompute(boolean b)
           
 void setCtrlPt(int numPoint, PicPoint pt, EditPointConstraint constraint)
          Set the coordinate of the control-point indexed by "numPoint" to the given value.
 void setGeometry(PicParallelogram para)
          Sets the coordinates of this element from those of the given source.
 void setParent(BranchElement p)
          Sets the parent of this element to be the given element.
 void setVisible(boolean b)
           
 void shear(PicPoint ptOrg, double shx, double shy)
          Cisaille cet élément par (shx,shy) en utilisant ptOrg comme origine.
 
Methods inherited from class jpicedt.graphic.model.PicParallelogram
convertToMultiCurve, createShape, getB2TVec, getBoundingBox, getCenter, getCtrlPt, getCtrlPtSubset, getFirstPointIndex, getL2RtoXAxisAngle, getL2RVec, getLastPointIndex, isRectangle, isXYorYXRectangle, isXYRectangle, makeRectangle, makeXYRectangle, scale, setCtrlPt, setGeometry, shear, toParalleloBasisCoordinates, toString, translate, updateParalleloBasis
 
Methods inherited from class jpicedt.graphic.model.AbstractElement
anchorPointsIterator, getAttribute, getAttributeSet, pullOutOfGroup, removeView, replaceBy, scale, scale, scale, setName, setViewFromFactory, syncArrowGeometry
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface jpicedt.graphic.model.Element
anchorPointsIterator, getAttribute, getAttributeSet, removeView, replaceBy, scale, scale, scale, setViewFromFactory, syncArrowGeometry
 

Constructor Detail

Drawing.BoundingBox

public Drawing.BoundingBox()

Drawing.BoundingBox

public Drawing.BoundingBox(Drawing.BoundingBox bb)
"cloning" constructor (to be used by clone())

Method Detail

setAutoCompute

public void setAutoCompute(boolean b)

isAutoCompute

public boolean isAutoCompute()

setVisible

public void setVisible(boolean b)

isVisible

public boolean isVisible()

clone

public Drawing.BoundingBox clone()
Description copied from class: PicParallelogram
Overrides Object.clone() method

Specified by:
clone in interface Element
Overrides:
clone in class PicParallelogram

getDefaultName

public String getDefaultName()
Overrides:
getDefaultName in class PicParallelogram
Returns:
a localised string that represents this object's name

getName

public String getName()
Description copied from interface: Element
Return a non-localised string representing this element's name. This may be used by a UI to display some information related to this element, or by a localizer to fetch a i18n'd string.

Specified by:
getName in interface Element
Overrides:
getName in class AbstractElement
Returns:
a localised string that represents this object's name

getView

public View getView()
Description copied from class: AbstractElement
Returns the View that's responsible for rendering this AbstractElement

Specified by:
getView in interface Element
Overrides:
getView in class AbstractElement
Returns:
the View that's responsible for rendering this Element

getDrawing

public Drawing getDrawing()
Description copied from class: AbstractElement
Retrieves the underlying drawing

Specified by:
getDrawing in interface Element
Overrides:
getDrawing in class AbstractElement
Returns:
the drawing ; null if this AbstractElement doesn't belong to any drawing yet.

getParent

public BranchElement getParent()
Description copied from class: AbstractElement
Gets the parent of the element.

Specified by:
getParent in interface Element
Overrides:
getParent in class AbstractElement
Returns:
the parent

fireChangedUpdate

protected void fireChangedUpdate(DrawingEvent.EventType eventType)
Description copied from class: AbstractElement
Must be called each time this AbstractElement changes. This default implementation updates the associated View if any, then propagates upward along the tree by calling forwardChangedUpdate(this) on the Element's parent, if any.
Tree's root-element should override so as to fire the change to the hosting drawing.
If subclasser are willing to override this method, they should call super.fireChangeUpdate.

Overrides:
fireChangedUpdate in class AbstractElement
Parameters:
eventType - the event type

setParent

public void setParent(BranchElement p)
Description copied from class: AbstractElement
Sets the parent of this element to be the given element.

Specified by:
setParent in interface Element
Overrides:
setParent in class AbstractElement
Parameters:
p - The parent to be set for this element.

setAttributeSet

public void setAttributeSet(PicAttributeSet attributeSet)
Description copied from class: AbstractElement
Bind the given attributes set to this Element. This implementation actually makes a deep copy of the given set beforehands.

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

setAttribute

public <T> void setAttribute(PicAttributeName<T> name,
                             T value)
Description copied from class: AbstractElement
Set the given attribute name to the given value for this AbstractElement

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

setCtrlPt

public void setCtrlPt(int numPoint,
                      PicPoint pt,
                      EditPointConstraint constraint)
Description copied from class: PicParallelogram
Set the coordinate of the control-point indexed by "numPoint" to the given value. The control-policy for the default (null or DEFAULT) constraint is as follows :

The SQUARE constraint imposes that the parallelogram be a square. The square diagonal is computed from the current control-point and its opposite corner. Other spec' points are set accordingly.

The CENTER_FIXED constraint imposes that the parallelogram center be kept fixed. Spec' points are set accordingly.

Specified by:
setCtrlPt in interface Element
Overrides:
setCtrlPt in class PicParallelogram
Parameters:
numPoint - one of P_TL, P_TR, P_BL, P_BR, SIDE_T, SIDE_B, SIDE_L, SIDE_R or P_CENTER.
constraint - either null or one of PicParallelogram.EditConstraint

setGeometry

public void setGeometry(PicParallelogram para)
Description copied from class: PicParallelogram
Sets the coordinates of this element from those of the given source. This methods fires a DrawingEvent.

Overrides:
setGeometry in class PicParallelogram

rotate

public void rotate(PicPoint ptOrg,
                   double angle)
Description copied from class: PicParallelogram
Rotate this Element by the given angle along the given point

Specified by:
rotate in interface Element
Overrides:
rotate in class PicParallelogram
angle - rotation angle in radians

mirror

public void mirror(PicPoint ptOrg,
                   PicVector normalVector)
Description copied from class: PicParallelogram
Effectue une réflexion sur this relativement à l'axe défini par ptOrg et normalVector.

Specified by:
mirror in interface Element
Overrides:
mirror in class PicParallelogram
Parameters:
ptOrg - le PicPoint par lequel passe l'axe de réflexion.
normalVector - le PicVector normal à l'axe de réflexion.

shear

public void shear(PicPoint ptOrg,
                  double shx,
                  double shy)
Description copied from class: AbstractElement
Cisaille cet élément par (shx,shy) en utilisant ptOrg comme origine. Ceci est une commodité d'appel de shear(ptOrg, shx, shy,UserConfirmationCache.DEFAULT).

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

createActions

public ArrayList<PEAction> createActions(ActionDispatcher actionDispatcher,
                                         ActionLocalizer localizer,
                                         HitInfo hi)
Description copied from class: PicParallelogram
Create an array of Action's related to this object

Specified by:
createActions in interface ActionFactory
Overrides:
createActions in class PicParallelogram
Parameters:
actionDispatcher - dispatches events to the proper PECanvas
localizer - i18n localizer for PEAction's
hi - une HitInfo contenant les informations relatives à l'évènement-souris qui a déclencher le menu contextuel.

createCustomizer

public AbstractCustomizer createCustomizer()
Description copied from interface: CustomizerFactory
Returns a customizer (Swing) component

Specified by:
createCustomizer in interface CustomizerFactory
Overrides:
createCustomizer in class PicParallelogram
Returns:
a Customizer for geometry editing

http://www.jpicedt.org

Submit a bug : syd@jpicedt.org