 |
Crossfire JXClient, Trunk
|
Go to the documentation of this file.
23 package com.realtime.crossfire.jxclient.gui.gauge;
100 if (this.cur ==
cur && this.min ==
min && this.max ==
max) {
113 if (this.width ==
width && this.height ==
height) {
170 protected static int calculate(
final int val,
final int max,
final int size) {
171 if (val <= 0 ||
max <= 0) {
177 return (size*val+
max/2)/
max;
227 protected void setExtent(
final int x,
final int y,
final int w,
final int h) {
int getH()
Returns the height of the highlighted part of the image.
int w
The width of the highlighted part of the image.
int getX()
Returns the x-coordinate of the highlighted part of the image.
int getMax()
Returns the maximum value.
int h
The height of the highlighted part of the image.
int cur
The current value.
void setExtent(final int x, final int y, final int w, final int h)
Sets the extent of the highlighted part of the image.
int width
The total width of the image.
Interface for orientation images.
int getY()
Returns the y-coordinate of the highlighted part of the image.
static int calculate(final int val, final int max, final int size)
Returns the fraction.
int getW()
Returns the width of the highlighted part of the image.
AbstractOrientation()
Creates a new instance.
boolean setExtends(final int width, final int height)
Sets the extends of the image.
int getMin()
Returns the minimum value.
Abstract base class for implementing Orientation instances.
int getCur()
Returns the current value.
int max
The maximum value; the gauge is displayed as full if.
boolean hasNegativeImage
Whether the gauge can display negative images.
boolean isLowImage()
Returns whether the low image should be shown.
int y
The y-coordinate of the highlighted part of the image.
int x
The x-coordinate of the highlighted part of the image.
boolean isNegativeImage()
Returns whether the negative image should be shown.
boolean isValid()
Returns whether the gauge's values are valid.
int getHeight()
Returns the total height of the image.
int height
The total height of the image.
void setHasNegativeImage(final boolean hasNegativeImage)
Sets whether the gauge can display negative images.
int getWidth()
Returns the total width of the image.
abstract void reCalculate()
Recalculate the extents of the highlighted image part.
int min
The minimum value; the gauge is displayed as empty if.
boolean setValues(final int cur, final int min, final int max)
Sets the gauge's values.