Package megamek.client.ui.widget
Class MegaMekBorder
java.lang.Object
javax.swing.border.AbstractBorder
javax.swing.border.EtchedBorder
megamek.client.ui.widget.MegaMekBorder
- All Implemented Interfaces:
- Serializable,- Border
A Border that has an image for each corner as well as images for the line in between each corner (an edge). Edges can
 consist of multiple possible icon and each possible icon can be tiled or static. The total amount of space taken up
 by tiled icons is determined by subtracting the space of the static icons and then evenly distributing it amongst
 each tiled icon.
- See Also:
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptiongetBorderInsets(Component c, Insets insets) voidloadIcons(SkinSpecification skin) Use the given skin specification to create ImageIcons for each of the files specified in the skin specification.voidpaintBorder(Component c, Graphics g, int x, int y, int width, int height) Paints the border using the loaded corner icons and edge icons.Methods inherited from class javax.swing.border.EtchedBordergetEtchType, getHighlightColor, getHighlightColor, getShadowColor, getShadowColor, isBorderOpaqueMethods inherited from class javax.swing.border.AbstractBordergetBaseline, getBaselineResizeBehavior, getBorderInsets, getInteriorRectangle, getInteriorRectangle
- 
Field Details- 
tlCorner
- 
trCorner
- 
blCorner
- 
brCorner
- 
leftLine
- 
topLine
- 
rightLine
- 
bottomLine
- 
leftShouldTile
- 
topShouldTile
- 
rightShouldTile
- 
bottomShouldTile
- 
leftStaticSpaceprotected int leftStaticSpace
- 
topStaticSpaceprotected int topStaticSpace
- 
rightStaticSpaceprotected int rightStaticSpace
- 
bottomStaticSpaceprotected int bottomStaticSpace
- 
leftNumTiledIconsprotected int leftNumTiledIcons
- 
topNumTiledIconsprotected int topNumTiledIcons
- 
rightNumTiledIconsprotected int rightNumTiledIcons
- 
bottomNumTiledIconsprotected int bottomNumTiledIcons
- 
insets
 
- 
- 
Constructor Details- 
MegaMekBorder
- 
MegaMekBorder
 
- 
- 
Method Details- 
loadIconsUse the given skin specification to create ImageIcons for each of the files specified in the skin specification.- Parameters:
- skin- The skin specification that specifies which icons should be used where
 
- 
paintBorderPaints the border using the loaded corner icons and edge icons.- Specified by:
- paintBorderin interface- Border
- Overrides:
- paintBorderin class- EtchedBorder
 
- 
getBorderInsets- Overrides:
- getBorderInsetsin class- EtchedBorder
 
 
-