use of org.apache.pivot.wtk.Meter in project pivot by apache.
the class TerraMeterSkin method paint.
@Override
public void paint(Graphics2D graphics) {
Meter meter = (Meter) getComponent();
int width = getWidth();
int height = getHeight();
if (meter.getOrientation() == Orientation.HORIZONTAL) {
drawMeter(meter, graphics, width, height);
} else {
graphics.rotate(-Math.PI / 2d);
graphics.translate(-height, 0);
drawMeter(meter, graphics, height, width);
}
}
use of org.apache.pivot.wtk.Meter in project pivot by apache.
the class TerraMeterSkin method install.
@Override
public void install(Component component) {
super.install(component);
Meter meter = (Meter) component;
meter.getMeterListeners().add(this);
}
Aggregations