Package megamek.client.ui.swing
Class UnitOverview
java.lang.Object
megamek.client.ui.swing.UnitOverview
- All Implemented Interfaces:
IDisplayable
,IPreferenceChangeListener
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The maximum length of the icon name. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String
adjustString
(String s, FontMetrics metrics) void
Draw this IDisplayable to the Graphics graph, which is the boardview graphics.protected String
getIconName
(Entity e, FontMetrics metrics) static int
boolean
Returns true when this IDisplayable is dragged or resized using mouse dragging.boolean
Returns true when the mouse position point is considered "within" this IDisplayable.boolean
void
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface megamek.client.ui.IDisplayable
isBeingDragged, isMouseOver, isSliding, setIdleTime, slide
-
Field Details
-
ICON_NAME_MAX_LENGTH
public static final int ICON_NAME_MAX_LENGTHThe maximum length of the icon name.- See Also:
-
-
Constructor Details
-
UnitOverview
-
-
Method Details
-
getUIWidth
public static int getUIWidth() -
draw
Description copied from interface:IDisplayable
Draw this IDisplayable to the Graphics graph, which is the boardview graphics. The currently visible part of the boardview is given by the Rectangle rect, so the upper left corner of the visible boardview is rect.x, rect.y.- Specified by:
draw
in interfaceIDisplayable
-
isHit
Description copied from interface:IDisplayable
Returns true when the mouse position point is considered "within" this IDisplayable. This is called when a mouse button is pressed. The default for this method will always return false.- Specified by:
isHit
in interfaceIDisplayable
-
isDragged
Description copied from interface:IDisplayable
Returns true when this IDisplayable is dragged or resized using mouse dragging. This will prevent the boardview from reacting to this mouse action. The default for this method will always return false.- Specified by:
isDragged
in interfaceIDisplayable
-
isReleased
public boolean isReleased()- Specified by:
isReleased
in interfaceIDisplayable
-
getIconName
-
adjustString
-
preferenceChange
- Specified by:
preferenceChange
in interfaceIPreferenceChangeListener
-