Class GlobalMap.CounterViewer
java.lang.Object
VASSAL.search.AbstractImageFinder
VASSAL.build.AbstractBuildable
VASSAL.build.AbstractConfigurable
VASSAL.build.module.map.CounterDetailViewer
VASSAL.build.module.map.GlobalMap.CounterViewer
- All Implemented Interfaces:
DragSourceMotionListener, KeyListener, MouseListener, MouseMotionListener, EventListener, AutoConfigurable, Buildable, Configurable, Drawable, PropertyNameSource, ValidityChecker, Translatable, Auditable, ImageSearchTarget, SearchTarget
- Enclosing class:
GlobalMap
-
Nested Class Summary
Nested classes/interfaces inherited from class CounterDetailViewer
CounterDetailViewer.CounterFormatConfig, CounterDetailViewer.DisplayConfig, CounterDetailViewer.EmptyFormatConfig, CounterDetailViewer.Filter, CounterDetailViewer.MinConfig, CounterDetailViewer.ReportFormatConfig, CounterDetailViewer.TerrainConfig, CounterDetailViewer.VisitorModifier and TypeClassDescriptionstatic classstatic classstatic classprotected classUtility class to select the pieces we wish to view.static classstatic classstatic classprotected static classNested classes/interfaces inherited from interface AutoConfigurable
AutoConfigurable.Util -
Field Summary
Fields inherited from class CounterDetailViewer
ALL_LAYERS, ALWAYS, BG_COLOR, bgColor, BORDER_COLOR, BORDER_INNER_THICKNESS, BORDER_THICKNESS, BORDER_WIDTH, borderColor, borderInnerThickness, borderThickness, borderWidth, bounds, CENTER_ALL, CENTER_PIECES_VERTICALLY, CENTER_TEXT, centerAll, centerPiecesVertically, centerText, COMBINE_COUNTER_SUMMARY, combineCounterSummary, COUNTER_REPORT_FORMAT, counterReportFormat, currentMousePosition, delay, DELAY, delayTimer, desc, DESCRIPTION, DISPLAY, displayablePieces, displayableTerrain, displayLayers, displayWhat, DRAW_PIECES, DRAW_PIECES_AT_ZOOM, drawPieces, drawSingleDeprecated, EMPTY_HEX_REPORT_FORMAT, emptyHexReportFormat, ENABLE_HTML, enableHTML, EXC_LAYERS, EXTRA_TEXT_PADDING, extraTextPadding, FG_COLOR, fgColor, FILTER, font, FONT_SIZE, fontSize, GRAPH_SINGLE_DEPRECATED, graphicsVisible, graphicsZoomLevel, hotkey, HOTKEY, IF_ONE, INC_LAYERS, lastPieceBounds, LATEST_VERSION, LAYER_LIST, map, MINIMUM_DISPLAYABLE, minimumDisplayablePieces, mouseInView, NEVER, ONLY_SHOW_FIRST_SUMMARY, onlyShowFirstSummary, PREFERRED_DELAY, PROPERTY_FILTER, propertyFilter, SHOW_DECK, SHOW_DECK_DEPTH, SHOW_DECK_MASKED, SHOW_MOVE_SELECTED, SHOW_NON_MOVABLE, SHOW_NOSTACK, SHOW_ONLY_TOP_OF_STACK, SHOW_OVERLAP, SHOW_TERRAIN_BENEATH, SHOW_TERRAIN_HEIGHT, SHOW_TERRAIN_SNAPPY, SHOW_TERRAIN_TEXT, SHOW_TERRAIN_WIDTH, SHOW_TERRAIN_ZOOM, SHOW_TEXT, SHOW_TEXT_SINGLE_DEPRECATED, showDeck, showDeckDepth, showDeckMasked, showMoveSelected, showNonMovable, showNoStack, showNumberFromDeck, showOnlyTopOfStack, showOverlap, showTerrainBeneath, showTerrainHeight, showTerrainSnappy, showTerrainText, showTerrainWidth, showTerrainZoom, showText, showTextSingleDeprecated, STOP_AFTER_SHOWING, stopAfterShowing, STRETCH_WIDTH_PIECES, STRETCH_WIDTH_SUMMARY, stretchWidthPieces, stretchWidthSummary, SUM, SUMMARY_REPORT_FORMAT, summaryReportFormat, textVisible, TOP_LAYER, UNROTATE_PIECES, unrotatePieces, USE_KEYBOARD, version, VERSION, VERTICAL_BOTTOM_TEXT, VERTICAL_OFFSET, VERTICAL_TOP_TEXT, verticalBottomText, verticalOffset, verticalTopText, view, ZOOM_LEVEL, zoomLevelModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringprotected Colorstatic final Stringstatic final Stringstatic final Stringstatic final Stringprotected Colorprotected intprotected intprotected intprotected Rectanglestatic final Stringstatic final Stringstatic final Stringprotected booleanprotected booleanprotected booleanstatic final Stringprotected booleanstatic final Stringprotected FormattedStringprotected MouseEventprotected intstatic final Stringprotected Timerprotected Stringstatic final Stringstatic final Stringprotected booleanprotected String[]protected Stringstatic final Stringstatic final Stringprotected booleanprotected booleanstatic final Stringprotected FormattedStringstatic final Stringprotected booleanstatic final Stringstatic final Stringprotected intstatic final Stringprotected Colorstatic final Stringprotected Fontstatic final Stringprotected intstatic final Stringprotected booleanprotected doubleprotected KeyStrokestatic final Stringstatic final Stringstatic final Stringprotected Rectanglestatic final Stringstatic final Stringprotected Mapstatic final Stringprotected intprotected booleanstatic final Stringstatic final Stringprotected booleanstatic final Stringstatic final Stringprotected PropertyExpressionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprotected booleanprotected static intDeprecated, for removal: This API element is subject to removal in a future version.protected booleanprotected booleanprotected booleanprotected booleanprotected intprotected booleanprotected booleanprotected Stringprotected intprotected booleanprotected FormattedStringprotected intprotected doubleprotected booleanprotected booleanstatic final Stringprotected booleanstatic final Stringstatic final Stringprotected booleanprotected booleanstatic final Stringstatic final Stringprotected FormattedStringprotected booleanstatic final Stringstatic final Stringprotected booleanstatic final Stringprotected Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprotected intprotected intprotected intprotected JComponentthe JComponent which is repainted when the detail viewer changesstatic final Stringprotected doubleFields inherited from class AbstractConfigurable
changeSupport, config, localizedName, myI18nData, nameModifier and TypeFieldDescriptionprotected PropertyChangeSupportprotected Configurerprotected Stringprotected ComponentI18nDataprotected StringFields inherited from class AbstractBuildable
buildComponents, validatorFields inherited from interface Configurable
NAME_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionBuild an ArrayList of pieces to be displayed in order from bottom up, based on selection criteria setup in config.protected doublegetZoom()Methods inherited from class CounterDetailViewer
addLocalImageNames, addTo, checkUpgrade, dragMouseMoved, draw, draw, drawAboveCounters, drawGraphics, drawLabel, drawLabel, drawLabel, drawText, fixBounds, fixBounds, getAllowableConfigureComponents, getAttributeDescriptions, getAttributeNames, getAttributeTypes, getAttributeValueString, getAttributeVisibility, getBounds, getConfigureName, getConfigurer, getConfigureTypeName, getExpressionList, getFormattedStringList, getHelpFile, getMap, getNamedKeyStrokeList, getPreferredDelay, hideDetails, isDrawingMouseOver, isStopAfterShowing, isTextUnderCounters, keyPressed, keyReleased, keyTyped, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, removeFrom, setAttribute, showDetails, upgradeModifier and TypeMethodDescriptionvoidIn case our labels refer to any image filesvoidAdds this component to its parent.protected voidCompatibility.voidvoiddraw(Graphics g, Point pt, JComponent comp) voidbooleanprotected voiddrawGraphics(Graphics g, Point pt, JComponent comp, List<GamePiece> pieces) protected voidprotected voiddrawLabel(Graphics g, Point pt, String label, int hAlign, int vAlign, int objectWidth, int minWidth, int extraBorder, boolean skipBox) protected voiddrawLabel(Graphics g, Point pt, String label, int hAlign, int vAlign, int objectWidth, int minWidth, int extraBorder, boolean skipBox, int extraTop, int extraBottom) Next, we go to this intermediate method, which deals with a couple of things (like deciding whether we're drawing in HTML mode or not) and then calls the LabelUtils to do the Hard Work.protected voidLabel with the location If the counter viewer is being displayed, then place the location name just above the left hand end of the counters.protected voidprotected voidSet the bounds field large enough to accommodate the given set of piecesClass<?>[]String[]Return an array of Strings describing the attributes of this object.String[]Lists all the buildFile (XML) attribute names for this component.Class<?>[]Return the Class for the attributes of this object.Called by theBuildable.getBuildElement(Document)method to write the attributes into an XML elementgetAttributeVisibility(String name) By default, all attributes are visibleprotected RectangleConfigureName is used, in particular, by the Editor to track the names of components, and is preferred byUniqueIdManager.static StringgetMap()protected intprotected voidstatic booleanDeprecated, for removal: This API element is subject to removal in a future version.booleanprotected booleanvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidremoveFrom(Buildable parent) Remove this component from its parentvoidsetAttribute(String name, Object value) Sets a buildFile (XML) attribute value for this component.protected voidprotected voidupgrade()Methods inherited from class AbstractConfigurable
add, addPropertyChangeListener, getConfigureComponents, getI18nData, getI18nPrefix, getLocalizedConfigureName, getMenuTextList, getPropertyList, getTypeName, remove, removePropertyChangeListener, setAllAttributesUntranslatable, setAttributeTranslatable, setConfigureNameModifier and TypeMethodDescriptionvoidSet the owning translatable of this componentvoidAdd a PropertyChangeListener.protected StringReturns the name of the configurable type for display purposes.voidRemove a Buildable object from this objectvoidprotected voidSets all attributes untranslatable.protected voidsetAttributeTranslatable(String attr, boolean b) Over-ride the default attribute translatability.voidSets the name and fires a PropertyChangeEventMethods inherited from class AbstractBuildable
addImageNamesRecursively, build, buildString, getAllDescendantComponentsOf, getAncestor, getBuildables, getBuildComponents, getBuildElement, getComponents, getComponentsOf, getNonFolderAncestor, getPropertyNames, setAncestor, validateModifier and TypeMethodDescriptionvoidAdds all images used by this component AND any subcomponents to the collectionvoidBuild this component by getting all XML attributes of the XML element and callingAbstractBuildable.setAttribute(String, Object)with the String value of the attribute<T> List<T> getAllDescendantComponentsOf(Class<T> target) Recursively descend the build tree and return aListof all components that are instances of the given classDeprecated, for removal: This API element is subject to removal in a future version.getBuildElement(Document doc) <T> Enumeration<T> getComponents(Class<T> target) Deprecated, for removal: This API element is subject to removal in a future version.UseAbstractBuildable.getComponentsOf(Class)instead.<T> List<T> getComponentsOf(Class<T> target) Override this method to provide a list of properties to be exposed for use by expressions in the module.voidsetAncestor(Buildable ancestor) voidvalidate(Buildable target, ValidationReport report) Methods inherited from class AbstractImageFinder
getAllImageNames, getLocalImageNamesModifier and TypeMethodDescriptionMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Auditable
getComponentName, getComponentTypeNameMethods inherited from interface Buildable
isMandatory, isMovable, isUniqueModifier and TypeMethodDescriptiondefault booleanIs this component a reqired component within its parent?default booleanIs this component allowed to be moved around the Configure Tree?default booleanisUnique()Does this component need to be unique within it's parent?
-
Constructor Details
-
CounterViewer
public CounterViewer()
-
-
Method Details
-
getDisplayablePieces
Description copied from class:CounterDetailViewerBuild an ArrayList of pieces to be displayed in order from bottom up, based on selection criteria setup in config.- Overrides:
getDisplayablePiecesin classCounterDetailViewer
-
getZoom
protected double getZoom()- Overrides:
getZoomin classCounterDetailViewer
-
AbstractBuildable.getBuildables()instead.