ch.sahits.game.graphic.layout
Class Label
java.lang.Object
ch.sahits.game.graphic.layout.AbstractSahitsComponent
ch.sahits.game.graphic.layout.Label
- All Implemented Interfaces:
- ISahitsComponent, ISahitsLabel
public class Label
- extends AbstractSahitsComponent
- implements ISahitsLabel
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
text
private String text
font
private Font font
metric
private final FontMetrics metric
Label
public Label(FontMetrics fm)
paint
public void paint(Graphics g)
- Description copied from interface:
ISahitsComponent
- Draw the component with the appropriate graphic context.
Before calling this method make sure it is appropriately initialized.
- Specified by:
paint in interface ISahitsComponent
getPreferredSize
public Dimension getPreferredSize()
- Description copied from interface:
ISahitsComponent
- Retrieve the preferred size of the component.
- Specified by:
getPreferredSize in interface ISahitsComponent
- Returns:
getFont
public Font getFont()
- Retrieve the font
- Specified by:
getFont in interface ISahitsComponent
- Returns:
setText
public void setText(String text)
- Description copied from interface:
ISahitsLabel
- Set the text of the label
- Specified by:
setText in interface ISahitsLabel
setFont
public void setFont(Font f)
- Description copied from interface:
ISahitsLabel
- Set the font of the label
- Specified by:
setFont in interface ISahitsComponent- Specified by:
setFont in interface ISahitsLabel
Copyright © 2011 Sahits GmbH. All Rights Reserved.