ch.sahits.game.graphic.layout
Class RadioButton
java.lang.Object
ch.sahits.game.graphic.layout.AbstractSahitsComponent
ch.sahits.game.graphic.layout.AbstractSelectableComponent
ch.sahits.game.graphic.layout.RadioButton
- All Implemented Interfaces:
- ISahitsComponent, IUpdatableComponent
public class RadioButton
- extends AbstractSelectableComponent
Implementable selecteable Radio button. This component is a single selectable.
- Author:
- Andi Hotz, (c) Sahits GmbH, 2011
Created on Jun 9, 2011
group
private final SelectableGroup group
text
private String text
RadioButton
public RadioButton(SelectableGroup group,
JPanel panel,
Font f)
RadioButton
public RadioButton(SelectableGroup group,
FontMetrics metric,
Font f)
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.
getPreferredSize
public Dimension getPreferredSize()
- Description copied from interface:
ISahitsComponent
- Retrieve the preferred size of the component.
- Returns:
setText
public void setText(String text)
updateSelected
private void updateSelected(boolean selected)
- Update the selected state
- Parameters:
selected -
testClick
public void testClick(MouseEvent e)
testClick
public void testClick(Point p)
- Description copied from interface:
IUpdatableComponent
- Test if there was a mouse click on the component
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2011 Sahits GmbH. All Rights Reserved.