org.stellarium.ui.components
Class LabeledButton

java.lang.Object
  extended by java.awt.event.KeyAdapter
      extended by org.stellarium.ui.components.StellariumComponent
          extended by org.stellarium.ui.components.CallbackComponent
              extended by org.stellarium.ui.components.Button
                  extended by org.stellarium.ui.components.LabeledButton
All Implemented Interfaces:
java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener, java.util.EventListener
Direct Known Subclasses:
TabHeader

public class LabeledButton
extends Button

Button with text on it


Nested Class Summary
 
Nested classes/interfaces inherited from class org.stellarium.ui.components.StellariumComponent
StellariumComponent.S_GUI_VALUE
 
Field Summary
(package private)  boolean isBright
           
(package private)  Justification justification
           
protected  StelLabel label
           
static int LABEL_PAD
           
 
Fields inherited from class org.stellarium.ui.components.Button
BUTTON_HEIGHT, hideBorder, hideBorderMouseOver, hideTexture
 
Fields inherited from class org.stellarium.ui.components.CallbackComponent
isMouseOver, onMouseInOutCallback, onPressCallback
 
Fields inherited from class org.stellarium.ui.components.StellariumComponent
active, defaultPainter, desktop, focus, focusing, guiBaseColor, guiColorSchemeMember, guiTextColor, moveToFront, needNewTopEdit, painter, pos, scissor, size, type, visible
 
Constructor Summary
LabeledButton(java.lang.String label)
           
LabeledButton(java.lang.String someLabel, SFontIfc someFont)
           
LabeledButton(java.lang.String someLabel, SFontIfc someFont, Justification j)
           
LabeledButton(java.lang.String someLabel, SFontIfc someFont, Justification j, boolean brigth)
           
 
Method Summary
(package private)  void adjustSize()
           
 void draw()
           
 java.lang.String getLabel()
           
(package private)  void justify()
           
(package private)  void setActive(boolean state)
           
 void setBright(boolean bright)
           
 void setColorScheme(SColor baseColor, SColor textColor)
           
 void setFont(SFontIfc someFont)
           
 void setJustification(Justification justification)
           
 void setLabel(java.lang.String label)
           
 void setPainter(Painter p)
           
 void setTextColor(SColor c)
           
 
Methods inherited from class org.stellarium.ui.components.Button
mouseClicked, setHideBorder, setHideBorderMouseOver, setHideTexture
 
Methods inherited from class org.stellarium.ui.components.CallbackComponent
callbackOnClic, callbackOnMove, getActive, getFocus, getIsMouseOver, getPos, getPosx, getPosy, getSize, getSizeX, getSizeY, getVisible, mouseMoved, setFocus, setOnMouseInOutCallback, setOnPressCallback, setPos, setPos, setPosx, setPosy, setSize, setSize, setSizeX, setSizey, setTexture, setVisible
 
Methods inherited from class org.stellarium.ui.components.StellariumComponent
deleteScissor, disableScissor, enableScissor, getFont, getNeedNewEdit, getType, inFront, initScissor, isIn, keyPressed, mouseDragged, mouseEntered, mouseExited, mousePressed, mouseReleased, mouseWheelMoved, reshape, reshape, setBaseColor, setDefaultPainter, setGUIColorSchemeMember, setInFront, setNeedNewEdit, setOpaque
 
Methods inherited from class java.awt.event.KeyAdapter
keyReleased, keyTyped
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LABEL_PAD

public static final int LABEL_PAD
See Also:
Constant Field Values

label

protected StelLabel label

justification

Justification justification

isBright

boolean isBright
Constructor Detail

LabeledButton

public LabeledButton(java.lang.String label)

LabeledButton

public LabeledButton(java.lang.String someLabel,
                     SFontIfc someFont)

LabeledButton

public LabeledButton(java.lang.String someLabel,
                     SFontIfc someFont,
                     Justification j)

LabeledButton

public LabeledButton(java.lang.String someLabel,
                     SFontIfc someFont,
                     Justification j,
                     boolean brigth)
Method Detail

justify

void justify()

adjustSize

void adjustSize()

setColorScheme

public void setColorScheme(SColor baseColor,
                           SColor textColor)
Overrides:
setColorScheme in class StellariumComponent

draw

public void draw()
Overrides:
draw in class Button

setActive

void setActive(boolean state)
Overrides:
setActive in class CallbackComponent

setFont

public void setFont(SFontIfc someFont)
Overrides:
setFont in class CallbackComponent

setTextColor

public void setTextColor(SColor c)
Overrides:
setTextColor in class StellariumComponent

setPainter

public void setPainter(Painter p)
Overrides:
setPainter in class StellariumComponent

setJustification

public void setJustification(Justification justification)

getLabel

public java.lang.String getLabel()

setLabel

public void setLabel(java.lang.String label)

setBright

public void setBright(boolean bright)