 |
Crossfire JXClient, Trunk
|
Go to the documentation of this file.
23 package com.realtime.crossfire.jxclient.gui.misc;
32 import java.awt.Color;
33 import java.awt.Dimension;
34 import java.awt.Graphics;
35 import java.awt.event.MouseEvent;
36 import org.jetbrains.annotations.NotNull;
37 import org.jetbrains.annotations.Nullable;
123 this.scrollable.addScrollableListener(
this);
135 throw new IllegalArgumentException(
"valueMax="+valueMax+
" <= "+
valueMin+
"="+
valueMin);
138 throw new IllegalArgumentException(
"sliderSize="+
sliderSize+
" <= 0");
153 super.mousePressed(e);
159 switch (e.getButton()) {
160 case MouseEvent.BUTTON1:
165 }
else if (
offset >= sh) {
172 case MouseEvent.BUTTON2:
175 case MouseEvent.BUTTON3:
182 super.mouseReleased(e);
188 switch (e.getButton()) {
189 case MouseEvent.BUTTON1:
193 case MouseEvent.BUTTON2:
196 case MouseEvent.BUTTON3:
203 super.mouseDragged(e);
211 super.mouseWheelMoved(wheelRotation);
274 super.paintComponent(g);
278 g.fillRect(0, 0, getWidth(), sy);
279 g.fillRect(0, sy+sh, getWidth(), getHeight()-sy-sh);
281 g.fillRect(0, sy, getWidth(), sh);
286 @SuppressWarnings(
"MethodDoesntCallSuperMethod")
288 return new Dimension(16, 64);
293 @SuppressWarnings(
"MethodDoesntCallSuperMethod")
295 return new Dimension(16, 16);
void setChanged()
Records that the contents have changed and must be repainted.
A GUIElement that can be set to active or inactive.
final GuiFactory guiFactory
The global GuiFactory instance.
final GUIElementListener elementListener
The GUIElementListener to notify.
Information for displaying tooltips.
Factory for creating Gui instances.
final String name
The name of this element.
final TooltipManager tooltipManager
The TooltipManager to update.
Listener for GUIElement related events.