hades.symbols
Class HorizontalBarGraph

java.lang.Object
  extended byjfig.objects.FigBaseobject
      extended byjfig.objects.FigCompound
          extended byhades.symbols.HorizontalBarGraph
All Implemented Interfaces:
FigDrawable, FigObject, java.io.Serializable

public class HorizontalBarGraph
extends FigCompound
implements java.io.Serializable

HorizontalBarGraph: a simple horizontal bar graph with user defined number of segments.

This class is realized as a subclass of FigCompound with specific attributes: layer 10, color red, centered around its position, fixed size 40/2400 inch.

See Also:
Serialized Form

Field Summary
protected  int n_color
           
protected  int n_segments
           
protected  FigRectangle[] rectangles
           
protected  int value
           
protected  int xl
           
protected  int xr
           
protected  int yb
           
protected  int yt
           
 
Fields inherited from class jfig.objects.FigCompound
 
Fields inherited from class jfig.objects.FigBaseobject
attribs, bbox, comment, debug, painter, printer, sc_bbox, sc_bbox_timestamp, selected, showPoints, syncRedrawFlag, timestamp, trafo, visible, x, y
 
Constructor Summary
HorizontalBarGraph()
           
HorizontalBarGraph(int n_segments)
           
 
Method Summary
 void build_attribs()
           
 void build_segments()
           
 FigObject copy()
          The copy() method for a compound object.
 boolean initialize(java.lang.String s)
          initialize a HorizontalBarGraph from a String.
 void message(java.lang.String msg)
           
 void setValue(int value)
           
 java.lang.String toString()
          toString() - the usual info method
 
Methods inherited from class jfig.objects.FigCompound
addMember, canRotate, changeLayerRecursively, deleteAllMembers, deleteMember, fastAddMember, getMembers, isMember, minDistanceEuclid, mirrorX, mirrorY, move, paint, paint, paintInverse, paintSave, rebuild, rotate, scale, setObjectPainter, setTrafo, setVisible, update_bbox, update
 
Methods inherited from class jfig.objects.FigBaseobject
appendPoint, build_sc_bbox, clonePoints, deletePoint, deselect, get_sc_bbox, getAttributes, getBbox, getComment, getLayer, getMovePointNeighbors, getNearestPoint, getNeighborPoints, getPoints, getPosition, getSyncRedrawFlag, getText, getTimestamp, getTrafo, insertPoint, isClosed, isSelected, isShowPoints, isVisible, isVisible, keyPressed, manhattan, minDistance, movePoint, numPoints, paint, reset_debug, select, set_debug, setAttributes, setComment, setConsole, setPoints, setSyncRedrawFlag, setText, showPoints, supportsPointOps, updateAttributes, writeAsResource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

n_segments

protected int n_segments

value

protected int value

n_color

protected int n_color

xl

protected int xl

xr

protected int xr

yt

protected int yt

yb

protected int yb

rectangles

protected FigRectangle[] rectangles
Constructor Detail

HorizontalBarGraph

public HorizontalBarGraph()

HorizontalBarGraph

public HorizontalBarGraph(int n_segments)
Method Detail

build_attribs

public void build_attribs()

build_segments

public void build_segments()

setValue

public void setValue(int value)

initialize

public boolean initialize(java.lang.String s)
initialize a HorizontalBarGraph from a String. The String is expected to contain the bounding box coordinates, the number of segments to display, the initial value, and the color index, that is: xl yt xr yb n_segments value n_color

Specified by:
initialize in interface FigObject
Overrides:
initialize in class FigBaseobject

copy

public FigObject copy()
Description copied from class: FigCompound
The copy() method for a compound object. We first create a new compound object. Then we create copies of all members of this compound and add them to the new one. Finally we return the new compound.

To get the xfig copy behaviour, the editor may combine copy() with a subsequent move().

Specified by:
copy in interface FigObject
Overrides:
copy in class FigCompound

message

public void message(java.lang.String msg)
Overrides:
message in class FigBaseobject

toString

public java.lang.String toString()
toString() - the usual info method

Specified by:
toString in interface FigObject
Overrides:
toString in class FigCompound