Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.nwoods.jgo.instruments
Class Meter

    java.lang.Object
      com.nwoods.jgo.JGoObject
          com.nwoods.jgo.JGoArea
              com.nwoods.jgo.instruments.Meter

All Implemented Interfaces:
  JGoObjectCollection, JGoObjectSimpleCollection, JGoXMLSaveRestore, java.io.Serializable

Direct Known Subclasses:
  MultipleIndicatorMeter

public class Meter
extends JGoArea

A JGoArea designed to maintain a AbstractGraduatedScale, an AbstractIndicator, a JGoObject background, and a JGoText label.

See Also:
  Serialized Form

Field Summary
`static int` | `ChangedBackground` This is a JGoObject update subhint.
`static int` | `ChangedIndicator` This is a JGoObject update subhint.
`static int` | `ChangedInsets` This is a JGoObject update subhint.
`static int` | `ChangedLabel` This is a JGoObject update subhint.
`static int` | `ChangedLabelRelativeSpot` This is a JGoObject update subhint.
`static int` | `ChangedLabelSpot` This is a JGoObject update subhint.
`static int` | `ChangedOrientation` This is a JGoObject update subhint.
`static int` | `ChangedScale` This is a JGoObject update subhint.
`static int` | `OrientationHorizontal` A value for the Orientation property.
`static int` | `OrientationVertical` A value for the Orientation property.

Fields inherited from class com.nwoods.jgo.JGoArea
`ChangedPickableBackground`

Fields inherited from class com.nwoods.jgo.JGoObject
`Bottom, BottomCenter, BottomLeft, BottomMiddle, BottomRight, Center, CenterLeft, CenterRight, Changed4ResizeHandles, ChangedAutoRescale, ChangedBrush, ChangedDraggable, ChangedDragsNode, ChangedGeometry, ChangedGrabChildSelection, ChangedInitializing, ChangedPen, ChangedResizable, ChangedSelectable, ChangedUpdatePartner, ChangedVisible, ChangedZOrder, LastChangedHint, Left, LeftCenter, NoHandle, NoSpot, NumReservedHandles, RepaintAll, Right, RightCenter, SideLeft, SideRight, Top, TopCenter, TopLeft, TopMiddle, TopRight`

Constructor Summary
`Meter()` Creates an empty Meter -- call initialize() before using!

Method Summary
`void` | `changeValue(JGoDocumentChangedEdit e, boolean undo)` Handle undo and redo changes.
`protected void` | `copyChildren(JGoArea newarea, JGoCopyEnvironment env)` Make sure fields referring to children are updated to refer to the newly copied objects.
`void` | `copyNewValueForRedo(JGoDocumentChangedEdit e)` This method is called when a JGoDocumentChangedEdit is created for a JGoDocumentEvent.CHANGED event, when a JGoObject has been changed.
`JGoObject` | `copyObject(JGoCopyEnvironment env)` Copy the field values and the internal data structures to avoid sharing
`protected JGoObject` | `createBackground()` Method for creating an instance of the meter's standard background.
`protected AbstractIndicator` | `createIndicator()` Method for creating an instance of the meter's standard indicator.
`protected JGoText` | `createLabel()` Method for creating an instance of the meter's standard label.
`protected AbstractGraduatedScale` | `createScale()` Method for creating an instance of the meter's standard scale.
`JGoObject` | `getBackground()` Gets the background object of the Meter.
`AbstractIndicator` | `getIndicator()` Gets the AbstractIndicator associated with the Meter.
`java.awt.Insets` | `getInsets()` Gets the margin between the top-left corner of the Background and the top-left corner of the Scale (and AbstractIndicator).
`JGoText` | `getLabel()` Gets the label object of the Meter.
`int` | `getLabelRelativeSpot()` Gets the Label's position compared to the spot specified by the LabelSpot.
`int` | `getLabelSpot()` Gets the position of Label compared to the Background.
`double` | `getMaximum()` AbstractGraduatedScale's Maximum property exposed from this Meter's Scale.
`double` | `getMinimum()` AbstractGraduatedScale's Minimum property exposed from this Meter's Scale.
`int` | `getOrientation()` Some meters may find it useful to be oriented along either a horizontal or vertical direction; others may ignore this.
`double` | `getQuantizeBase()` The AbstractIndicator.QuantizeBase property exposed from the Meter's AbstractIndicator.
`double` | `getQuantizeUnit()` The AbstractIndicator.QuantizeUnit property exposed from the Meter's AbstractIndicator.
`AbstractGraduatedScale` | `getScale()` Gets the AbstractGraduatedScale associated with the Meter.
`int` | `getScaleLabelDistance()` AbstractGraduatedScale's LabelDistance property exposed from this Meter's Scale.
`java.lang.String` | `getScaleLabelFormat()` AbstractGraduatedScale's LabelFormat property exposed from this Meter's Scale.
`int` | `getScaleLabelFrequency()` AbstractGraduatedScale's LabelFrequency property exposed from this Meter's Scale.
`int` | `getScaleLabelStyle()` AbstractGraduatedScale's LabelStyle property exposed from this Meter's Scale.
`double` | `getTickBase()` AbstractGraduatedScale's TickBase property exposed from this Meter's Scale.
`java.awt.Color` | `getTickColor()` AbstractGraduatedScale's TickColor property exposed from this Meter's Scale.
`float` | `getTickLengthLeft()` AbstractGraduatedScale's TickLengthLeft property exposed from this Meter's Scale.
`float` | `getTickLengthRight()` AbstractGraduatedScale's TickLengthRight property exposed from this Meter's Scale.
`int` | `getTickMajorFrequency()` AbstractGraduatedScale's TickMajorFrequency property exposed from this Meter's Scale.
`float` | `getTickMajorLengthRatio()` AbstractGraduatedScale's TickMajorLengthRatio property exposed from this Meter's Scale.
`int` | `getTickMajorWidth()` AbstractGraduatedScale's TickMajorWidth property exposed from this Meter's Scale.
`double` | `getTickUnit()` AbstractGraduatedScale's TickUnit property exposed from this Meter's Scale.
`int` | `getTickWidth()` AbstractGraduatedScale's TickWidth property exposed from this Meter's Scale.
`double` | `getValue()` The AbstractIndicator.Value property exposed from the Meter's AbstractIndicator.
`void` | `initialize()` This calls createBackground(), createLabel(), createScale(), and createIndicator(), adds all the resulting objects to this area, and sets the AbstractIndicator's Scale to the created scale.
`boolean` | `isControllable()` Gets whether the value of the meter can be manipulated by the user.
`boolean` | `isQuantized()` The AbstractIndicator.Quantized property exposed from the Meter's AbstractIndicator.
`boolean` | `isTickLabels()` AbstractGraduatedScale's TickLabels property exposed from this Meter's Scale.
`void` | `layoutChildren(JGoObject childchanged)` Have the Scale and AbstractIndicator have the same bounds smaller than and within the Background, as determined by TopLeftMargin and BottomRightMargin.
`JGoObject` | `removeObjectAtPos(JGoListPosition pos)` If any part is removed from this group, be sure to remove any references in local fields.
`void` | `setBackground(JGoObject value)` Sets the background object of the Meter.
`void` | `setControllable(boolean value)` Sets whether the value of the meter can be manipulated by the user.
`void` | `setIndicator(AbstractIndicator value)` Sets the AbstractIndicator associated with the Meter.
`void` | `setInsets(java.awt.Insets x)` Sets the margin between the top-left corner of the Background and the top-left corner of the Scale (and AbstractIndicator).
`void` | `setLabel(JGoText value)` Sets the label object of the Meter.
`void` | `setLabelRelativeSpot(int value)` Sets the Label's position compared to the spot specified by the LabelSpot.
`void` | `setLabelSpot(int value)` Sets the position of Label compared to the Background.
`void` | `setMaximum(double value)` AbstractGraduatedScale's Maximum property exposed from this Meter's Scale.
`void` | `setMinimum(double value)` AbstractGraduatedScale's Minimum property exposed from this Meter's Scale.
`void` | `setOrientation(int value)` Some meters may find it useful to be oriented along either a horizontal or vertical direction; others may ignore this.
`void` | `setQuantizeBase(double value)` The AbstractIndicator.QuantizeBase property exposed from the Meter's AbstractIndicator.
`void` | `setQuantized(boolean value)` The AbstractIndicator.Quantized property exposed from the Meter's AbstractIndicator.
`void` | `setQuantizeUnit(double value)` The AbstractIndicator.QuantizeUnit property exposed from the Meter's AbstractIndicator.
`void` | `setScale(AbstractGraduatedScale value)` Sets the AbstractGraduatedScale associated with the Meter.
`void` | `setScaleLabelDistance(int value)` AbstractGraduatedScale's LabelDistance property exposed from this Meter's Scale.
`void` | `setScaleLabelFormat(java.lang.String value)` AbstractGraduatedScale's LabelFormat property exposed from this Meter's Scale.
`void` | `setScaleLabelFrequency(int value)` AbstractGraduatedScale's LabelFrequency property exposed from this Meter's Scale.
`void` | `setScaleLabelStyle(int value)` AbstractGraduatedScale's LabelStyle property exposed from this Meter's Scale.
`void` | `setTickBase(double value)` AbstractGraduatedScale's TickBase property exposed from this Meter's Scale.
`void` | `setTickColor(java.awt.Color value)` AbstractGraduatedScale's TickColor property exposed from this Meter's Scale.
`void` | `setTickLabels(boolean value)` AbstractGraduatedScale's TickLabels property exposed from this Meter's Scale.
`void` | `setTickLengthLeft(float value)` AbstractGraduatedScale's TickLengthLeft property exposed from this Meter's Scale.
`void` | `setTickLengthRight(float value)` AbstractGraduatedScale's TickLengthRight property exposed from this Meter's Scale.
`void` | `setTickMajorFrequency(int value)` AbstractGraduatedScale's TickMajorFrequency property exposed from this Meter's Scale.
`void` | `setTickMajorLengthRatio(float value)` AbstractGraduatedScale's TickMajorLengthRatio property exposed from this Meter's Scale.
`void` | `setTickMajorWidth(int value)` AbstractGraduatedScale's TickMajorWidth property exposed from this Meter's Scale.
`void` | `setTickUnit(double value)` AbstractGraduatedScale's TickUnit property exposed from this Meter's Scale.
`void` | `setTickWidth(int value)` AbstractGraduatedScale's TickWidth property exposed from this Meter's Scale.
`void` | `setValue(double value)` The AbstractIndicator.Value property exposed from the Meter's AbstractIndicator.
`DomNode` | `SVGReadObject(DomDoc svgDoc, JGoDocument jGoDoc, DomElement svgElement, DomElement jGoChildElement)` Read this object in from a DomDoc representing a Scalable Vector Graphics (SVG) XML document.
`void` | `SVGUpdateReference(java.lang.String attr, java.lang.Object referencedObject)` This method will be called to fill in object references.
`void` | `SVGWriteObject(DomDoc svgDoc, DomElement jGoElementGroup)` Write this object out to a DomDoc representing a Scalable Vector Graphics (SVG) XML document.

Methods inherited from class com.nwoods.jgo.JGoArea
`addCollection, addCollection, addObjectAtHead, addObjectAtTail, bringObjectToFront, computeBoundingRect, expandRectByPenWidth, findObject, geometryChange, geometryChangeChild, getFirstObjectPos, getLastObjectPos, getNearestIntersectionPoint, getNextObjectPos, getNextObjectPosAtTop, getNumObjects, getObjectAtPos, getPrevObjectPos, insertObjectAfter, insertObjectBefore, isEmpty, isPickableBackground, moveChildren, paint, pick, pickObject, pickObjects, removeObject, rescaleChildren, sendObjectToBack, setPickableBackground`

Methods inherited from class com.nwoods.jgo.JGoObject
`canView, computeMove, computeResize, copy, copyObjectDelayed, copyOldValueForUndo, copyRect, doMouseClick, doMouseDblClick, doUncapturedMouseMove, findCommonParent, foredate, gainedSelection, getBoundingRect, getDocument, getDraggingObject, getFlags, getHeight, getLayer, getLeft, getLocation, getLocation, getParent, getParentJGoNode, getParentNode, getPartner, getRectangleSpotLocation, getSize, getSize, getSpotLocation, getSpotLocation, getToolTipText, getTop, getTopLeft, getTopLeft, getTopLevelObject, getView, getWidth, growRect, handleMove, handleResize, hideSelectionHandles, is4ResizeHandles, isAutoRescale, isBoundingRectInvalid, isChildOf, isDraggable, isDragsNode, isInitializing, isPointInObj, isResizable, isSelectable, isSkipsUndoManager, isSuspendChildUpdates, isSuspendUpdates, isTopLevel, isUpdatePartner, isVisible, lostSelection, ownerChange, partnerUpdate, redirectSelection, remove, set4ResizeHandles, setAutoRescale, setBoundingRect, setBoundingRect, setBoundingRect, setBoundingRectForce, setBoundingRectForce, setBoundingRectInvalid, setBoundsRect, setDraggable, setDragsNode, setFlags, setHeight, setInitializing, setLeft, setLocation, setLocation, setLocationOffset, setLocationOffset, setParent, setPartner, setRectangleSpotLocation, setResizable, setSelectable, setSize, setSize, setSizeKeepingLocation, setSkipsUndoManager, setSpotLocation, setSpotLocation, setSpotLocation, setSpotLocationOffset, setSuspendChildUpdates, setSuspendUpdates, setTop, setTopLeft, setTopLeft, setUpdatePartner, setVisible, setWidth, showSelectionHandles, spotOpposite, SVGReadAttributes, SVGWriteAttributes, update, update`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### OrientationHorizontal

    public static final int OrientationHorizontal

  A value for the Orientation property.

  See Also:
    Constant Field Values

### OrientationVertical

    public static final int OrientationVertical

  A value for the Orientation property.

  See Also:
    Constant Field Values

### ChangedBackground

    public static final int ChangedBackground

  This is a JGoObject update subhint.

  See Also:
    Constant Field Values

### ChangedLabel

    public static final int ChangedLabel

  This is a JGoObject update subhint.

  See Also:
    Constant Field Values

### ChangedIndicator

    public static final int ChangedIndicator

  This is a JGoObject update subhint.

  See Also:
    Constant Field Values

### ChangedScale

    public static final int ChangedScale

  This is a JGoObject update subhint.

  See Also:
    Constant Field Values

### ChangedInsets

    public static final int ChangedInsets

  This is a JGoObject update subhint.

  See Also:
    Constant Field Values

### ChangedOrientation

    public static final int ChangedOrientation

  This is a JGoObject update subhint.

  See Also:
    Constant Field Values

### ChangedLabelSpot

    public static final int ChangedLabelSpot

  This is a JGoObject update subhint.

  See Also:
    Constant Field Values

### ChangedLabelRelativeSpot

    public static final int ChangedLabelRelativeSpot

  This is a JGoObject update subhint.

  See Also:
    Constant Field Values

Constructor Detail

### Meter

    public Meter()

  Creates an empty Meter -- call initialize() before using!

Method Detail

### initialize

    public void initialize()

  This calls createBackground(), createLabel(), createScale(), and createIndicator(), adds all the resulting objects to this area, and sets the AbstractIndicator's Scale to the created scale.

  Be sure to call this method after constructing a new Meter. Subclasses of Meter should override this method to do any initialization after calling super.initialize().

### getScale

    public AbstractGraduatedScale getScale()

  Gets the AbstractGraduatedScale associated with the Meter.

### setScale

    public void setScale(AbstractGraduatedScale value)

  Sets the AbstractGraduatedScale associated with the Meter.

  This removes any old scale from this meter and adds the new one. This meter's AbstractIndicator's Scale is also set to be the new scale.

### getIndicator

    public AbstractIndicator getIndicator()

  Gets the AbstractIndicator associated with the Meter.

### setIndicator

    public void setIndicator(AbstractIndicator value)

  Sets the AbstractIndicator associated with the Meter.

  This removes any old indicator from this meter and adds the new one. The AbstractIndicator's Scale is also set to be this meter's scale.

### getBackground

    public JGoObject getBackground()

  Gets the background object of the Meter.

### setBackground

    public void setBackground(JGoObject value)

  Sets the background object of the Meter.

  This removes any old background object from this meter and adds the new one.

### getLabel

    public JGoText getLabel()

  Gets the label object of the Meter.

### setLabel

    public void setLabel(JGoText value)

  Sets the label object of the Meter.

  This removes any old label from this meter and adds the new one.

### createBackground

    protected JGoObject createBackground()

  Method for creating an instance of the meter's standard background.

  Returns:
    the new background object, normally a non-Selectable JGoRectangle with a lightGray brush

### createLabel

    protected JGoText createLabel()

  Method for creating an instance of the meter's standard label.

  Returns:
    the new label, normally a non-Selectable Transparent JGoText

### createScale

    protected AbstractGraduatedScale createScale()

  Method for creating an instance of the meter's standard scale.

  By default this returns null--each subclass should this to actually allocate and return some kind of AbstractGraduatedScale.

  Returns:
    an AbstractGraduatedScale

### createIndicator

    protected AbstractIndicator createIndicator()

  Method for creating an instance of the meter's standard indicator.

  By default this returns null--each subclass should this to actually allocate and return some kind of AbstractIndicator.

  Returns:
    an AbstractIndicator

### copyObject

    public JGoObject copyObject(JGoCopyEnvironment env)

  Copy the field values and the internal data structures to avoid sharing

  Overrides:
    `copyObject` in class `JGoArea`
  Parameters:
    `env` - the environment for the copy operation - keeps track of copied objects.
  Returns:
    the new Meter

### copyChildren

    protected void copyChildren(JGoArea newarea,
                                JGoCopyEnvironment env)

  Make sure fields referring to children are updated to refer to the newly copied objects.

  Overrides:
    `copyChildren` in class `JGoArea`
  Parameters:
    `newarea` -
    `env` -

### removeObjectAtPos

    public JGoObject removeObjectAtPos(JGoListPosition pos)

  If any part is removed from this group, be sure to remove any references in local fields.

  Specified by:
    `removeObjectAtPos` in interface `JGoObjectCollection`
  Overrides:
    `removeObjectAtPos` in class `JGoArea`
  Parameters:
    `pos` - a JGoListPosition in this area

### layoutChildren

    public void layoutChildren(JGoObject childchanged)

  Have the Scale and AbstractIndicator have the same bounds smaller than and within the Background, as determined by TopLeftMargin and BottomRightMargin. The Label is positioned according to the LabelSpot and LabelRelativeSpot.

  Overrides:
    `layoutChildren` in class `JGoArea`
  Parameters:
    `childchanged` -
  See Also:
    `JGoArea.geometryChange(java.awt.Rectangle)`, `JGoArea.geometryChangeChild(com.nwoods.jgo.JGoObject, java.awt.Rectangle)`

### getOrientation

    public int getOrientation()

  Some meters may find it useful to be oriented along either a horizontal or vertical direction; others may ignore this.

  The default value is Meter.OrientationHorizontal.

### setOrientation

    public void setOrientation(int value)

  Some meters may find it useful to be oriented along either a horizontal or vertical direction; others may ignore this.

  Parameters:
    `value` - one of: OrientationHorizontal or OrientationVertical

### getInsets

    public java.awt.Insets getInsets()

  Gets the margin between the top-left corner of the Background and the top-left corner of the Scale (and AbstractIndicator).

### setInsets

    public void setInsets(java.awt.Insets x)

  Sets the margin between the top-left corner of the Background and the top-left corner of the Scale (and AbstractIndicator).

### getLabelSpot

    public int getLabelSpot()

  Gets the position of Label compared to the Background.

  This defaults to JGoObject.MiddleBottom

### setLabelSpot

    public void setLabelSpot(int value)

  Sets the position of Label compared to the Background.

  Parameters:
    `value` - a label spot (one of the JGoObject constants)

### getLabelRelativeSpot

    public int getLabelRelativeSpot()

  Gets the Label's position compared to the spot specified by the LabelSpot.

  This defaults to JGoObject.MiddleBottom, thereby placing the label inside the Background.

### setLabelRelativeSpot

    public void setLabelRelativeSpot(int value)

  Sets the Label's position compared to the spot specified by the LabelSpot.

  Parameters:
    `value` - a label spot (one of the JGoObject constants)

### getMinimum

    public double getMinimum()

  AbstractGraduatedScale's Minimum property exposed from this Meter's Scale.

### setMinimum

    public void setMinimum(double value)

  AbstractGraduatedScale's Minimum property exposed from this Meter's Scale.

### getMaximum

    public double getMaximum()

  AbstractGraduatedScale's Maximum property exposed from this Meter's Scale.

### setMaximum

    public void setMaximum(double value)

  AbstractGraduatedScale's Maximum property exposed from this Meter's Scale.

### getTickUnit

    public double getTickUnit()

  AbstractGraduatedScale's TickUnit property exposed from this Meter's Scale.

### setTickUnit

    public void setTickUnit(double value)

  AbstractGraduatedScale's TickUnit property exposed from this Meter's Scale.

### getTickBase

    public double getTickBase()

  AbstractGraduatedScale's TickBase property exposed from this Meter's Scale.

### setTickBase

    public void setTickBase(double value)

  AbstractGraduatedScale's TickBase property exposed from this Meter's Scale.

### getTickColor

    public java.awt.Color getTickColor()

  AbstractGraduatedScale's TickColor property exposed from this Meter's Scale.

### setTickColor

    public void setTickColor(java.awt.Color value)

  AbstractGraduatedScale's TickColor property exposed from this Meter's Scale.

### getTickWidth

    public int getTickWidth()

  AbstractGraduatedScale's TickWidth property exposed from this Meter's Scale.

### setTickWidth

    public void setTickWidth(int value)

  AbstractGraduatedScale's TickWidth property exposed from this Meter's Scale.

### getTickLengthLeft

    public float getTickLengthLeft()

  AbstractGraduatedScale's TickLengthLeft property exposed from this Meter's Scale.

### setTickLengthLeft

    public void setTickLengthLeft(float value)

  AbstractGraduatedScale's TickLengthLeft property exposed from this Meter's Scale.

### getTickLengthRight

    public float getTickLengthRight()

  AbstractGraduatedScale's TickLengthRight property exposed from this Meter's Scale.

### setTickLengthRight

    public void setTickLengthRight(float value)

  AbstractGraduatedScale's TickLengthRight property exposed from this Meter's Scale.

### getTickMajorFrequency

    public int getTickMajorFrequency()

  AbstractGraduatedScale's TickMajorFrequency property exposed from this Meter's Scale.

### setTickMajorFrequency

    public void setTickMajorFrequency(int value)

  AbstractGraduatedScale's TickMajorFrequency property exposed from this Meter's Scale.

### getTickMajorWidth

    public int getTickMajorWidth()

  AbstractGraduatedScale's TickMajorWidth property exposed from this Meter's Scale.

### setTickMajorWidth

    public void setTickMajorWidth(int value)

  AbstractGraduatedScale's TickMajorWidth property exposed from this Meter's Scale.

### getTickMajorLengthRatio

    public float getTickMajorLengthRatio()

  AbstractGraduatedScale's TickMajorLengthRatio property exposed from this Meter's Scale.

### setTickMajorLengthRatio

    public void setTickMajorLengthRatio(float value)

  AbstractGraduatedScale's TickMajorLengthRatio property exposed from this Meter's Scale.

### isTickLabels

    public boolean isTickLabels()

  AbstractGraduatedScale's TickLabels property exposed from this Meter's Scale.

### setTickLabels

    public void setTickLabels(boolean value)

  AbstractGraduatedScale's TickLabels property exposed from this Meter's Scale.

### getScaleLabelStyle

    public int getScaleLabelStyle()

  AbstractGraduatedScale's LabelStyle property exposed from this Meter's Scale.

### setScaleLabelStyle

    public void setScaleLabelStyle(int value)

  AbstractGraduatedScale's LabelStyle property exposed from this Meter's Scale.

### getScaleLabelFrequency

    public int getScaleLabelFrequency()

  AbstractGraduatedScale's LabelFrequency property exposed from this Meter's Scale.

### setScaleLabelFrequency

    public void setScaleLabelFrequency(int value)

  AbstractGraduatedScale's LabelFrequency property exposed from this Meter's Scale.

### getScaleLabelDistance

    public int getScaleLabelDistance()

  AbstractGraduatedScale's LabelDistance property exposed from this Meter's Scale.

### setScaleLabelDistance

    public void setScaleLabelDistance(int value)

  AbstractGraduatedScale's LabelDistance property exposed from this Meter's Scale.

### getScaleLabelFormat

    public java.lang.String getScaleLabelFormat()

  AbstractGraduatedScale's LabelFormat property exposed from this Meter's Scale.

### setScaleLabelFormat

    public void setScaleLabelFormat(java.lang.String value)

  AbstractGraduatedScale's LabelFormat property exposed from this Meter's Scale.

### getValue

    public double getValue()

  The AbstractIndicator.Value property exposed from the Meter's AbstractIndicator.

### setValue

    public void setValue(double value)

  The AbstractIndicator.Value property exposed from the Meter's AbstractIndicator.

### isControllable

    public boolean isControllable()

  Gets whether the value of the meter can be manipulated by the user.

  Directly checks and changes the Meter's AbstractIndicator's AbstractIndicator.ActionEnabled property.

### setControllable

    public void setControllable(boolean value)

  Sets whether the value of the meter can be manipulated by the user.

  Directly checks and changes the Meter's AbstractIndicator's AbstractIndicator.ActionEnabled property.

### isQuantized

    public boolean isQuantized()

  The AbstractIndicator.Quantized property exposed from the Meter's AbstractIndicator.

### setQuantized

    public void setQuantized(boolean value)

  The AbstractIndicator.Quantized property exposed from the Meter's AbstractIndicator.

### getQuantizeBase

    public double getQuantizeBase()

  The AbstractIndicator.QuantizeBase property exposed from the Meter's AbstractIndicator.

### setQuantizeBase

    public void setQuantizeBase(double value)

  The AbstractIndicator.QuantizeBase property exposed from the Meter's AbstractIndicator.

### getQuantizeUnit

    public double getQuantizeUnit()

  The AbstractIndicator.QuantizeUnit property exposed from the Meter's AbstractIndicator.

### setQuantizeUnit

    public void setQuantizeUnit(double value)

  The AbstractIndicator.QuantizeUnit property exposed from the Meter's AbstractIndicator.

### copyNewValueForRedo

    public void copyNewValueForRedo(JGoDocumentChangedEdit e)

  Description copied from class: `JGoObject`
  This method is called when a JGoDocumentChangedEdit is created for a JGoDocumentEvent.CHANGED event, when a JGoObject has been changed. In order for the JGoDocumentChangedEdit to be able to perform a redo, it needs to remember the new property value or state. However, the JGoObject.update method does not provide such a new value. The value must be taken from this object and copied into the JGoDocumentChangedEdit by calling setNewValue and/or setNewValueInt.

  Just as the previous/old value/state information is stored as one or both of an integer and an Object, the new value/state information may be stored as either or both of an integer or an Object.

  The responsibility for copying rests with the document event listener rather than the code calling JGoObject.update for efficiency when there is no undo/redo manager.

  Overrides:
    `copyNewValueForRedo` in class `JGoArea`

### changeValue

    public void changeValue(JGoDocumentChangedEdit e,
                            boolean undo)

  Handle undo and redo changes.

  Overrides:
    `changeValue` in class `JGoArea`
  Parameters:
    `e` -
    `undo` -

### SVGWriteObject

    public void SVGWriteObject(DomDoc svgDoc,
                               DomElement jGoElementGroup)

  Description copied from interface: `JGoXMLSaveRestore`
  Write this object out to a DomDoc representing a Scalable Vector Graphics (SVG) XML document.

  This method will be called by com.nwoods.jgo.svg.DefaultDocument.SVGWriteDoc() for every JGoObject contained within a JGoDocument. The following example uses a JGoRectangle to illustrate the format of a generated SVG JGoObject:

  <g>
  <JGoClass class="com.nwoods.jgo.JGoRectangle"\>
  <rect height="75" style="stroke:black;stroke-width:1;fill:rgb(255,0,0);" width="75" x="65" y="71"/>
  <JGoClass class="com.nwoods.jgo.JGoDrawable" drawablebrush="jgoid1" drawablepen="jgoid2" embeddedpenbrush="false"/>
  <JGoClass class="com.nwoods.jgo.JGoObject" obj_flags="1054"/>
  </g>

  Note that the entire JGoObject is enclosed in a group (<g>). Each subclass of the JGoObject is described by a <JGoClass> element, starting with the most specific class and moving to the more general. Each <JGoClass> element has a "class" attribute which defines the class name. Each <JGoClass> element may also have several other attributes which uniquely describe that state of that class. Following the <JGoClass> element, each class may also genereate any other elements that are required, including representations of contained objects and standard SVG elements such as the <rect> element shown in the above example. The generation of SVG elements in the output makes it possible for the output to be read by SVG viewers and other SVG aware applications. The information contained in the <JGoClass> elements allows us to accurately save and restore all the information in a particular JGoObject subclass.

  If this class contains a reference to another object, call DomDoc.registerReferencingNode() to register that reference. This will cause the element representing the referenced object to be identified with a unique id attribute, and cause the element representing the referring object to have a user defined attribute containing a reference to that id. See DomDoc.registerReferencingNode() for more information.

  Typically, an implementation of this method will generate a <JGoClass> element using the DomDoc.createJGoClassElement() method, adding whatever attributes are necessary to describe the class. It will then call its superclass so that the superclass can add its own <JGoClass> element and other information to jGoElementGroup within the DomDoc.

  Refer to com.nwoods.jgo.examples.flower.ActivityNode.SVGWriteObject() and com.nwoods.jgo.examples.SimpleNode.SVGWriteObject() for examples using this method.

  Refer to the file com.nwoods.jgo.svg\xsvg.dtd for a formal description of JGo extensions to the SVG document type.

  Specified by:
    `SVGWriteObject` in interface `JGoXMLSaveRestore`
  Overrides:
    `SVGWriteObject` in class `JGoArea`

### SVGReadObject

    public DomNode SVGReadObject(DomDoc svgDoc,
                                 JGoDocument jGoDoc,
                                 DomElement svgElement,
                                 DomElement jGoChildElement)

  Description copied from interface: `JGoXMLSaveRestore`
  Read this object in from a DomDoc representing a Scalable Vector Graphics (SVG) XML document.

  This method will be called by com.nwoods.jgo.svg.DefaultDocument.SVGReadDoc() for every <JGoClass> element encountered in a DomDoc. First, an object of the type specified by the class attribute will be created and then the SVGReadObject() method will be called on that newly created object. Refer to SVGWriteObject() for a description of the expected format of the SVG document.

  This method may also be called by com.nwoods.jgo.svg.DefaultDocument.SVGReadDoc() when reading any SVG document, including those not generated by JGo and therefore not containing any <JGoClass> elements. In such cases, the DefaultDocument.SVGReadElement() method may be subclassed to examine the SVG element and cause the appropriate JGoObject to be created to represent that element and call SVGReadObject() on that newly created object. By default, standard JGoObjects such as JGoRectangles, JGoStrokes, etc will be created to represent these objects.

  If this class contains a reference to another object, call DomDoc.registerReferencingObject() to register that reference. This will cause the JGoObject.SVGUpdateReference() to be called on the referencing object after all the objects have been created, passing in the object befing referenced. See DomDoc.registerReferencingObject() for more information.

  Typically, an implementation of this method starts by verifying that the element being read is a <JGoClass> element (which will be true if jGoChildElement is not null). This will always be true unless you have subclassed the DefaultDocument.SVGReadElement() method as described above. It will then read the expected attributes of the <JGoClass> element (as written by SVGReadObject()), call SVGReadObject() on its superclass, and finally return the next element by calling svgElement.getNextSibling().

  Refer to com.nwoods.jgo.examples.flower.ActivityNode.SVGReadObject() and com.nwoods.jgo.examples.SimpleNode.SVGReadObject() for examples using this method.

  Specified by:
    `SVGReadObject` in interface `JGoXMLSaveRestore`
  Overrides:
    `SVGReadObject` in class `JGoArea`

### SVGUpdateReference

    public void SVGUpdateReference(java.lang.String attr,
                                   java.lang.Object referencedObject)

  Description copied from class: `JGoObject`
  This method will be called to fill in object references.

  This is called by com.nwoods.jgo.svg.DefaultDocument.SVGReadDoc() after all the objects have been created and if DomDoc.registerReferencingObject() has been previously called by SVGReadObject().

  Typically, an implementation of this method will first call the superclass and then fill in the appropriate object reference based on the attr argument.

  Refer to com.nwoods.jgo.examples.SimpleNode.SVGWriteObject() for an example using this method.

  Overrides:
    `SVGUpdateReference` in class `JGoObject`
  Parameters:
    `attr` - the attribute name specified by SVGReadDoc() in DomDoc.registerReferencingObject()
    `referencedObject` - the object being referenced
  See Also:
    `JGoObject.SVGWriteObject(com.nwoods.jgo.DomDoc, com.nwoods.jgo.DomElement)`, `JGoObject.SVGReadObject(com.nwoods.jgo.DomDoc, com.nwoods.jgo.JGoDocument, com.nwoods.jgo.DomElement, com.nwoods.jgo.DomElement)`, `JGoObject.SVGWriteAttributes(com.nwoods.jgo.DomElement)`, `JGoObject.SVGReadAttributes(com.nwoods.jgo.DomElement)`, `JGoObject.SVGUpdateReference(java.lang.String, java.lang.Object)`, `DomDoc`, `DomNode`, `DomElement`, `DomText`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD