22 package com.realtime.crossfire.jxclient.gui.gauge;
92 if (this.hasNegativeImage == hasNegativeImage) {
104 public boolean setValues(
final int cur,
final int min,
final int max) {
105 if (this.cur == cur && this.min == min && this.max == max) {
120 public boolean setExtends(
final int width,
final int height) {
121 if (this.width == width && this.height == height) {
191 protected static int calculate(
final int val,
final int max,
final int size) {
192 if (val <= 0 || max <= 0) {
198 return (size*val+max/2)/
max;
248 protected void setExtent(
final int x,
final int y,
final int w,
final int h) {
void setExtent(final int x, final int y, final int w, final int h)
Sets the extent of the highlighted part of the image.
boolean isNegativeImage()
Returns whether the negative image should be shown.whether the negative image should be shown ...
int getHeight()
Returns the total height of the image.
boolean hasNegativeImage
Whether the gauge can display negative images.
int height
The total height of the image.
int getWidth()
Returns the total width of the image.
int h
The height of the highlighted part of the image.
int w
The width of the highlighted part of the image.
static int calculate(final int val, final int max, final int size)
Returns the fraction.
int getCur()
Returns the current value.
int y
The y-coordinate of the highlighted part of the image.
int getMax()
Returns the maximum value.
Interface for orientation images.
int min
The minimum value; the gauge is displayed as empty if.
void setHasNegativeImage(final boolean hasNegativeImage)
Sets whether the gauge can display negative images.By default negative images are not supported...
boolean isValid()
Returns whether the gauge's values are valid.whether the values are valid
abstract void reCalculate()
Recalculate the extents of the highlighted image part.
int getX()
Returns the x-coordinate of the highlighted part of the image.the x-coordinate
int width
The total width of the image.
boolean setValues(final int cur, final int min, final int max)
Sets the gauge's values.the current value the minimum value the maximum value whether the values have...
int getW()
Returns the width of the highlighted part of the image.the width
Abstract base class for implementing Orientation instances.
int getMin()
Returns the minimum value.
int max
The maximum value; the gauge is displayed as full if.
int x
The x-coordinate of the highlighted part of the image.
int cur
The current value.
int getH()
Returns the height of the highlighted part of the image.the height
int getY()
Returns the y-coordinate of the highlighted part of the image.the y-coordinate
boolean setExtends(final int width, final int height)
Sets the extends of the image.the width the height true if the size changed, false else ...
AbstractOrientation()
Creates a new instance.