ch.sahits.game.graphic.layout
Class AbstractSahitsComponent
java.lang.Object
ch.sahits.game.graphic.layout.AbstractSahitsComponent
- All Implemented Interfaces:
- ISahitsComponent
- Direct Known Subclasses:
- AbstractEditableSahitsComponent, AbstractMultiselectableComponent, AbstractSelectableComponent, Button, Label
public abstract class AbstractSahitsComponent
- extends Object
- implements ISahitsComponent
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
bounds
private Rectangle bounds
insets
private Insets insets
painter
protected final ch.sahits.game.graphic.image.OpenPatricianSlabPainter painter
AbstractSahitsComponent
public AbstractSahitsComponent()
getBounds
public Rectangle getBounds()
- Retrieve the bounds
- Specified by:
getBounds in interface ISahitsComponent
- Returns:
setBounds
public void setBounds(int x,
int y,
int width,
int height)
- Description copied from interface:
ISahitsComponent
- Define the measurements of the component
- Specified by:
setBounds in interface ISahitsComponent
- Parameters:
x - position along the x axisy - position along the y axiswidth - of the componentheight - of the component
getInsets
protected Insets getInsets()
- Retrieve the insets
- Returns:
setInsets
public void setInsets(int top,
int right,
int bottom,
int left)
- Description copied from interface:
ISahitsComponent
- Define the insets of the component
- Specified by:
setInsets in interface ISahitsComponent
createVisualBounds
protected final Rectangle2D createVisualBounds(String s)
- Create the visual bounds for the string using the set font
- Parameters:
s - String to be used
- Returns:
- Rectangle representing the visual bounds of s
Copyright © 2011 Sahits GmbH. All Rights Reserved.