|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectlt.monarch.chart.mapper.AbstractAxisMapper
lt.monarch.chart.mapper.CountableAxisMapper
lt.monarch.chart.mapper.LabelAxisMapper
public class LabelAxisMapper extends CountableAxisMapper
Label axis mapper.
| Constructor and Description |
|---|
LabelAxisMapper()
Constructs a new LabelAxisMapper. |
LabelAxisMapper(java.lang.Object[] keys)
Constructs a new LabelAxisMapper with the specified set of labels. |
LabelAxisMapper(java.lang.Object[] keys,
AxisMapperRange range)
Constructs a new LabelAxisMapper with the specified set of labels and
specified visible range. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
formatKey(java.lang.Object key)
Returns a string representation of the specified key. |
int |
getLabelCount()
Gets a number of registered keys. |
double |
getPreferredHeight(AbstractGraphics g,
AbstractTextPainter textPainter)
Gets preferred height. |
double |
getPreferredWidth(AbstractGraphics g,
AbstractTextPainter textPainter)
Gets preferred width. |
java.lang.Object[] |
getRegisteredKeys()
Returns array of currently registered keys. |
AxisScale |
getScale()
Returns a scale object for this axis. |
AxisMapperRange |
getViewRange()
Gets an AxisMapperRange object representing visible axis range. |
double |
map(java.lang.Object key)
Finds a position on axis visible range for the specified label. |
java.lang.Object |
mapBack(double pos)
Finds a label on the axis nearest to the specified position. |
void |
registerKey(java.lang.Object key)
Registers the specified key in the mapper. |
void |
registerKeys(java.lang.Object[] keys)
Registers the specified key list to the mapper. |
void |
unregisterAll()
Unregisters all keys from the mapper. |
void |
unregisterKey(java.lang.Object key)
Unregisters specified key from the mapper. |
void |
unregisterKeys(java.lang.Object[] keys)
Unregisters specified keys from the mapper. |
| Methods inherited from class lt.monarch.chart.mapper.CountableAxisMapper |
|---|
getTextHeigh, getTextWidth |
| Methods inherited from class lt.monarch.chart.mapper.AbstractAxisMapper |
|---|
addListener, fireMappingChanged, getProjectionRange, removeListener, setProjectionRange |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LabelAxisMapper()
LabelAxisMapper.
public LabelAxisMapper(java.lang.Object[] keys)
LabelAxisMapper with the specified set of labels.
keys - the labels array
public LabelAxisMapper(java.lang.Object[] keys,
AxisMapperRange range)
LabelAxisMapper with the specified set of labels and
specified visible range.
keys - the labels arrayrange - the visible axis range| Method Detail |
|---|
public AxisMapperRange getViewRange()
AxisMapperRange object representing visible axis range. The object can
be used to set visible axis range.
public double map(java.lang.Object key)
key - the label to mappublic java.lang.Object mapBack(double pos)
mapBack in interface AxisMappermapBack in class AbstractAxisMapperpos - position on the axis visible partAxisMapper.mapBack(double)public AxisScale getScale()
public void registerKey(java.lang.Object key)
key - the key to registerpublic void unregisterKey(java.lang.Object key)
key - a key that should be unregisteredpublic void unregisterKeys(java.lang.Object[] keys)
keys - the array of keys that should be unregistered.public void unregisterAll()
public void registerKeys(java.lang.Object[] keys)
keys - array of keys to registerpublic java.lang.String formatKey(java.lang.Object key)
toString method is
used to create the string representation.
key - the key to formatpublic java.lang.Object[] getRegisteredKeys()
getRegisteredKeys in class CountableAxisMapperpublic int getLabelCount()
getLabelCount in class CountableAxisMapper
public double getPreferredHeight(AbstractGraphics g,
AbstractTextPainter textPainter)
AxisMapper
g - graphics contexttextPainter - text painter mode
public double getPreferredWidth(AbstractGraphics g,
AbstractTextPainter textPainter)
AxisMapper
g - graphics contexttextPainter - text painter mode
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||