public class AxisTickLabels extends Object implements org.eclipse.swt.events.PaintListener
Modifier | Constructor and Description |
---|---|
protected |
AxisTickLabels(Chart chart,
Axis axis)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
dispose()
Disposes the resources.
|
protected org.eclipse.swt.graphics.Rectangle |
getBounds()
Gets the bounds on chart panel.
|
org.eclipse.swt.graphics.Font |
getFont()
Gets the font.
|
protected org.eclipse.swt.graphics.Color |
getForeground()
Gets the foreground color.
|
protected Format |
getFormat()
Gets the format for axis tick label.
|
ChartLayoutData |
getLayoutData()
Gets the layout data.
|
int |
getLeftMarginHint(int length)
Updates the left margin hint.
|
int |
getRightMarginHint(int length)
Gets the right margin hint.
|
int |
getTickLabelMaxLength()
Gets the max length of tick label.
|
ArrayList<Integer> |
getTickLabelPositions()
Gets the tick label positions.
|
protected ArrayList<Double> |
getTickLabelValues()
Gets the tick label values.
|
void |
paintControl(org.eclipse.swt.events.PaintEvent e) |
void |
setBounds(int x,
int y,
int width,
int height)
Sets the bounds on chart panel.
|
protected void |
setFont(org.eclipse.swt.graphics.Font font)
Sets the font.
|
void |
setForeground(org.eclipse.swt.graphics.Color color)
Sets the foreground color.
|
protected void |
setFormat(Format format)
Sets the format for axis tick label.
|
protected void |
update(int length)
Updates the tick labels.
|
protected void |
updateLayoutData()
Updates the tick labels layout.
|
public void setForeground(org.eclipse.swt.graphics.Color color)
color
- the foreground colorprotected org.eclipse.swt.graphics.Color getForeground()
protected void update(int length)
length
- the axis lengthpublic int getRightMarginHint(int length)
length
- the axis lengthpublic int getLeftMarginHint(int length)
length
- the axis lengthpublic int getTickLabelMaxLength()
public ArrayList<Integer> getTickLabelPositions()
protected ArrayList<Double> getTickLabelValues()
protected void setFont(org.eclipse.swt.graphics.Font font)
font
- the fontpublic org.eclipse.swt.graphics.Font getFont()
public ChartLayoutData getLayoutData()
public void setBounds(int x, int y, int width, int height)
x
- the x coordinatey
- the y coordinatewidth
- the widthheight
- the heightprotected org.eclipse.swt.graphics.Rectangle getBounds()
protected void dispose()
protected void updateLayoutData()
public void paintControl(org.eclipse.swt.events.PaintEvent e)
paintControl
in interface org.eclipse.swt.events.PaintListener
protected void setFormat(Format format)
If null is set, default format will be used.
format
- the formatprotected Format getFormat()
Copyright © 2016. All Rights Reserved.