fr.orsay.lri.varna.views
Class VueAnnotation

java.lang.Object
  extended by fr.orsay.lri.varna.views.VueAnnotation

public class VueAnnotation
extends Object

annoted text view for edition

Author:
Darty@lri.fr

Field Summary
private  fr.orsay.lri.varna.controlers.ControleurVueAnnotation _controleurVueAnnotation
           
private  VARNAPanel _vp
           
private  JButton colorButton
           
private  boolean limited
           
private  boolean newAnnotation
           
private  JPanel panel
           
private  Point2D.Double position
           
private  JSlider rotationSlider
           
private  TextAnnotation textAnnotation
           
private  TextAnnotation textAnnotationSave
           
private  JTextArea textArea
           
private  VueFont vueFont
           
private  JSlider xSlider
           
private  JSlider ySlider
           
 
Constructor Summary
VueAnnotation(VARNAPanel vp)
          creates a view for a new annoted text, without limited option
VueAnnotation(VARNAPanel vp, boolean limited)
          creates a view for a new annoted text
VueAnnotation(VARNAPanel vp, int x, int y)
          creates a view for a new annoted text at a given position, without limited option
VueAnnotation(VARNAPanel vp, int x, int y, boolean limited)
          creates a view for a new annoted text at a given position, without limited option
VueAnnotation(VARNAPanel vp, TextAnnotation textAnnot, boolean newAnnotation)
          creates a view for an annoted text, without limited option
VueAnnotation(VARNAPanel vp, TextAnnotation textAnnot, boolean reduite, boolean newAnnotation)
          creates a view for an annoted text
 
Method Summary
private  void applyFont()
           
 VARNAPanel get_vp()
           
 JPanel getPanel()
           
 TextAnnotation getTextAnnotation()
           
 boolean isLimited()
           
 boolean isNewAnnotation()
           
 void setLimited(boolean limited)
           
 void show()
          shows the dialog which add it to the VARNAPanel for previsualization.
 void update()
          update the annoted text on the VARNAPanel
 void updateColor(Color c)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_vp

private VARNAPanel _vp

ySlider

private JSlider ySlider

xSlider

private JSlider xSlider

colorButton

private JButton colorButton

textArea

private JTextArea textArea

panel

private JPanel panel

textAnnotation

private TextAnnotation textAnnotation

textAnnotationSave

private TextAnnotation textAnnotationSave

vueFont

private VueFont vueFont

_controleurVueAnnotation

private fr.orsay.lri.varna.controlers.ControleurVueAnnotation _controleurVueAnnotation

newAnnotation

private boolean newAnnotation

limited

private boolean limited

position

private Point2D.Double position

rotationSlider

private JSlider rotationSlider
Constructor Detail

VueAnnotation

public VueAnnotation(VARNAPanel vp,
                     boolean limited)
creates a view for a new annoted text

Parameters:
vp -
limited - if true, lets custom position and angle.

VueAnnotation

public VueAnnotation(VARNAPanel vp)
creates a view for a new annoted text, without limited option

Parameters:
vp -

VueAnnotation

public VueAnnotation(VARNAPanel vp,
                     int x,
                     int y)
creates a view for a new annoted text at a given position, without limited option

Parameters:
vp -

VueAnnotation

public VueAnnotation(VARNAPanel vp,
                     int x,
                     int y,
                     boolean limited)
creates a view for a new annoted text at a given position, without limited option

Parameters:
vp -

VueAnnotation

public VueAnnotation(VARNAPanel vp,
                     TextAnnotation textAnnot,
                     boolean newAnnotation)
creates a view for an annoted text, without limited option

Parameters:
vp -
textAnnot -

VueAnnotation

public VueAnnotation(VARNAPanel vp,
                     TextAnnotation textAnnot,
                     boolean reduite,
                     boolean newAnnotation)
creates a view for an annoted text

Parameters:
vp -
textAnnot -
reduite - if true, lets custom position and angle.
newAnnotation - if true, deleted if cancelled.
Method Detail

applyFont

private void applyFont()

update

public void update()
update the annoted text on the VARNAPanel


getPanel

public JPanel getPanel()

getTextAnnotation

public TextAnnotation getTextAnnotation()
Returns:
the annoted text

get_vp

public VARNAPanel get_vp()

show

public void show()
shows the dialog which add it to the VARNAPanel for previsualization.

if validate, just update the annoted text

if cancelled : remove the annoted text if it was a new one, otherwise cancel modifications


isLimited

public boolean isLimited()

setLimited

public void setLimited(boolean limited)

isNewAnnotation

public boolean isNewAnnotation()

updateColor

public void updateColor(Color c)