Class WidgetMap
- All Implemented Interfaces:
DropTargetListener, MouseListener, MouseMotionListener, PropertyChangeListener, EventListener, AutoConfigurable, Buildable, Configurable, GameComponent, PlayerRoster.SideChangeListener, MutablePropertiesContainer, PropertyNameSource, PropertySource, ComponentDescription, ValidityChecker, Translatable, Auditable, ImageSearchTarget, SearchTarget, ToolBarComponent, UniqueIdManager.Identifyable
-
Nested Class Summary
Nested classes/interfaces inherited from class Map
Map.ChangeFormatConfig, Map.CreateFormatConfig, Map.IconConfig, Map.InsetLayout, Map.Merger, Map.MoveToFormatConfig, Map.MoveWithinFormatConfig, Map.UnmovedIconConfig, Map.UnmovedReportConfig, Map.ViewModifier and TypeClassDescriptionstatic classReport format configurer for "modified on map"static classReport format configurer for "created on map"static classAutoconfigurer for map's icon used on its launch buttonstatic classstatic classstatic classReport format configurer for "moved to map"static classReport format configurer for "moved within map"static classAutoconfigurer for mark-unmoved iconstatic classReport format configurer for clear movement historystatic classThe (JPanel-extending) component that represents the map itselfNested classes/interfaces inherited from class AbstractToolbarItem
AbstractToolbarItem.FormattedStringConfigNested classes/interfaces inherited from interface AutoConfigurable
AutoConfigurable.UtilNested classes/interfaces inherited from interface MutablePropertiesContainer
MutablePropertiesContainer.ImplModifier and TypeInterfaceDescriptionstatic classSimple implementation ofMutablePropertiesContainer -
Field Summary
Fields inherited from class Map
activeMap, ALLOW_MULTIPLE, allowMultiple, BACKGROUND_COLOR, bgColor, boardHeights, boards, boardWidths, BUTTON_NAME, CHANGE_FORMAT, changeFormat, changeReportingEnabled, clearFirst, CREATE_FORMAT, createFormat, DEFAULT_EDGE_SCROLL_DELAY_PROPERTY, DEFAULT_EDGE_SCROLL_RATE_PROPERTY, DEFAULT_EDGE_SCROLL_ZONE_PROPERTY, description, DESCRIPTION, dragGestureListener, drawComponents, dx, dy, EDGE_HEIGHT, EDGE_SCROLL_RATE, EDGE_WIDTH, edgeBuffer, HIDE_KEY, hideCounters, hideKeyListener, HIGHLIGHT_COLOR, HIGHLIGHT_THICKNESS, highlighter, highlighters, HOTKEY, ICON, idMgr, keyBufferer, launchButton, layeredPane, LOCATION, mainWindowDock, MAP_NAME, mapID, mapName, MARK_MOVED, MARK_UNMOVED_HOTKEY, MARK_UNMOVED_ICON, MARK_UNMOVED_REPORT, MARK_UNMOVED_TEXT, MARK_UNMOVED_TOOLTIP, markMovedOption, markUnmovedHotkey, markUnmovedIcon, markUnmovedReport, markUnmovedText, markUnmovedTooltip, MESSAGE, metrics, mouseListenerStack, MOVE_KEY, MOVE_TO_FORMAT, MOVE_WITHIN_FORMAT, moveKey, moveToFormat, moveWithinFormat, MOVING_STACKS_PICKUP_UNITS, multicaster, NAME, OLD_LOCATION, OLD_MAP, ONLY_REPORT_CHANGED_LOCATION, onlyReportChangedLocation, picker, PIECE_NAME, pieceMover, pieceOpacity, pieces, PREFERRED_EDGE_DELAY, PREFERRED_EDGE_SCROLL_DELAY, PREFERRED_EDGE_SCROLL_RATE, PREFERRED_EDGE_SCROLL_RATE_STANDARD_DEFAULT, PREFERRED_EDGE_SCROLL_ZONE_STANDARD_DEFAULT, PREFERRED_SCROLL_ZONE, preferredCenter, propsContainer, repaintOnPropertyChange, saveKeyListeners, scroll, SCROLL_ZONE, scroller, SHOW_KEY, showKeyListener, splitPane, SUPPRESS_AUTO, sx, sy, theMap, toolBar, tooltip, TOOLTIP, USE_LAUNCH_BUTTON, useLaunchButton, useLaunchButtonEdit, visibilityCondition, zoomModifier and TypeFieldDescriptionstatic Mapstatic final Stringprotected booleanstatic final Stringprotected Colorprotected int[][]protected int[][]static final Stringstatic final Stringprotected Stringprotected static booleanprotected booleanstatic final Stringprotected Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected Stringstatic final Stringprotected DragGestureListenerprotected intprotected intstatic final Stringstatic doublestatic final Stringprotected Dimensionstatic final Stringprotected booleanprotected NamedKeyStrokeListenerstatic final Stringstatic final Stringprotected Highlighterprotected ArrayList<Highlighter> static final Stringstatic final Stringprotected static final UniqueIdManagerprotected KeyBuffererprotected LaunchButtonDeprecated, for removal: This API element is subject to removal in a future version.use launch from the superclassprotected JLayeredPanestatic final Stringprotected ComponentSplitter.SplitPaneDeprecated, for removal: This API element is subject to removal in a future version.static final Stringprotected Stringprotected Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprotected Stringprotected NamedKeyStrokeprotected Stringprotected Stringprotected Stringprotected Stringstatic final Stringprotected StackMetricsprotected ArrayList<MouseListener> static final Stringstatic final Stringstatic final Stringprotected NamedKeyStrokeprotected Stringprotected Stringstatic final Stringprotected MouseListenerstatic final Stringstatic final Stringstatic final Stringstatic final Stringprotected booleanprotected BoardPickerstatic final Stringprotected PieceMoverprotected floatprotected PieceCollectionstatic final Stringstatic final intstatic final Stringstatic final doubleThe rate at which things scrollstatic final intThe width of the hot zone for triggering autoscrolling.static final Stringprotected Pointprotected MutablePropertiesContainerprotected PropertyChangeListenerprotected KeyListener[]protected JScrollPanestatic intprotected org.jdesktop.animation.timing.AnimatorThe animator which controls autoscrolling.static final Stringprotected NamedKeyStrokeListenerprotected SplitPanestatic final Stringprotected intThe horizontal component of the autoscrolling vector, -1, 0, or 1.protected intThe vertical component of the autoscrolling vector, -1, 0, or 1.protected JPanelprotected JToolBarprotected Stringstatic final Stringstatic final Stringprotected booleanprotected booleanprotected VisibilityConditionprotected ZoomerFields inherited from class AbstractToolbarItem
BUTTON_TEXT, CAN_DISABLE, canDisable, DISABLED_ICON, disabledIconConfig, HIDE_WHEN_DISABLED, hideWhenDisabled, launch, property, PROPERTY_GATE, propertyGate, showDisabledOptionsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringprotected booleanstatic final Stringprotected IconConfigurerstatic final Stringprotected booleanprotected LaunchButtonprotected MutableProperty.Implstatic final Stringprotected Stringprotected booleanFields 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 TypeMethodDescriptiongetAttributeVisibility(String name) By default, all attributes are visiblevoidsetup(boolean show) When a game is started, create a top-level window, if none exists.booleanWidget maps are always undockedMethods inherited from class Map
addDrawComponent, addHighlighter, addLocalImageNames, addLocalMouseListener, addLocalMouseListenerFirst, addMutableProperty, addPiece, addTo, appendToTitle, apply, boundingBoxOf, build, centerAt, centerAt, clearActiveMap, clearMapBorder, componentCoordinates, componentRectangle, componentToDrawing, componentToDrawing, componentToDrawing, componentToMap, componentToMap, componentToMap, createParentFrame, disableKeyListeners, dragEnter, dragExit, dragOver, drawBoards, drawBoardsInRegion, drawBoardsInRegion, drawDrawable, drawingToComponent, drawingToComponent, drawingToComponent, drawingToMap, drawingToMap, drawingToMap, drawPieces, drawPiecesInRegion, drawPiecesInRegion, drop, dropActionChanged, enableKeyListeners, ensureVisible, findAnyPiece, findBoard, findPiece, findRegion, findZone, findZone, getAllowableConfigureComponents, getAllPieces, getAttributeDescriptions, getAttributeNames, getAttributeTypes, getAttributeValueString, getBoardByName, getBoardCount, getBoardPicker, getBoards, getCenter, getChangeFormat, getChangeFormat, getComponent, getConfigureTypeName, getCreateFormat, getDeckNameAt, getDeckNameContaining, getDefaultWindowTitle, getDescription, getDragGestureListener, getEdgeBuffer, getFormattedStringList, getHelpFile, getHighlighter, getHighlighters, getId, getIdentifier, getKeyBufferer, getLayeredPane, getLocalizedDeckNameAt, getLocalizedMapName, getLocalizedProperty, getLocation, getLocation, getLocation2D, getLocation2D, getMapById, getMapList, getMapName, getMaxPixelsPerRangeUnit, getMenuTextList, getMoveKey, getMoveToFormat, getMoveWithinFormat, getMutablePropertiesContainerId, getMutableProperty, getNamedKeyStrokeList, getPieceCollection, getPieceMover, getPieceOpacity, getPieces, getPreferredCenter, getPreferredSize, getProperty, getPropertyNames, getRestoreCommand, getStackMetrics, getToolBar, getView, getVisibleRect, getZoom, getZoomer, hideMap, indexOf, isAnyMouseoverDrawn, isChangeReportingEnabled, isDrawingMouseOver, isFirstMap, isLocationRestricted, isMarkMoved, isNotPieceDrag, isOnlyReportChangedLocation, isPiecesVisible, isVisibleToAll, localizedLocationName, locationName, mapCoordinates, mapRectangle, mapSize, mapToComponent, mapToComponent, mapToComponent, mapToDrawing, mapToDrawing, mapToDrawing, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, paintRegion, paintRegion, placeAt, placeOrMerge, popMouseListener, popMouseListener, positionOf, pushMouseListener, removeDrawComponent, removeFrom, removeHighlighter, removeLocalMouseListener, removeMutableProperty, removePiece, repaint, repaint, repaint, scale, scale, scale, scroll, scrollAtEdge, selectionBoundsOf, setActiveMap, setAnyMouseoverDrawn, setAttribute, setBoardBoundaries, setBoardPicker, setBoards, setChangeReportingEnabled, setDragGestureListener, setDrawingMouseOver, setHighlighter, setId, setKeyBufferer, setMapName, setPieceCollection, setPieceMover, setPieceOpacity, setPiecesVisible, setStackMetrics, setUpView, setZoomer, showMap, sideChanged, snapTo, snapTo, snapTo, translateEvent, updateCenter, updateTitleBarModifier and TypeMethodDescriptionvoidaddDrawComponent(Drawable theComponent) Registers aDrawablecomponent to this map.voidvoidIn case reports use HTML and refer to any image filesvoidBecause MouseEvents are received in Component coordinates, it is inconvenient for MouseListeners on the map to have to translate to Map coordinates.voidBecause MouseEvents are received in Component coordinates, it is inconvenient for MouseListeners on the map to have to translate to Map coordinates.voidaddMutableProperty(String key, MutableProperty p) Adds a new Global Property to this map.voidAdds a GamePiece to this map's list of pieces.voidRegisters this Map as a child of another buildable component, usually theGameModule.voidDeprecated, for removal: This API element is subject to removal in a future version.apply(PieceVisitorDispatcher commandFactory) Attempts to apply the providedPieceVisitorDispatcherto all pieces on this map, until it finds one that returns a non-null Command.voidBuilds the map's component hierarchy from a given XML element, or a null one is given initializes a brand new default "new map" hierarchy.voidCenter the map at given map coordinates within its JScrollPane containervoidCenter the map at the given map coordinates, if the point is not already within (dx,dy) of the center.static voidRepaints the current ActiveMap (seeMap.setActiveMap(Map)) and unmarks it.protected voidClears the map border region, if any.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.intcomponentToDrawing(int c, double os_scale) Converts an integer value from Component coordinates system to Drawing coordinates for rendering.componentToDrawing(Point p, double os_scale) Converts a Point from Component coordinates to Drawing coordinates for rendering.componentToDrawing(Rectangle r, double os_scale) Converts a Rectangle from Component coordinates to Drawing coordinates for rendering.intcomponentToMap(int c) Converts an integer value from swing Component coordinates to the Map's coordinate system.Converts a Point from swing Component coordinates to the Map's coordinate system.Converts a Rectangle from swing Component coordinates to the Map's coordinate system.protected WindowCreates the top-level window for this map.voidRestore the previously disabled KeyListenersvoiddragEnter(DropTargetDragEvent dtde) voiddragExit(DropTargetEvent dte) voiddragOver(DropTargetDragEvent dtde) Handles scrolling when dragging an gamepiece to the edge of the windowvoiddrawBoards(Graphics g, int xoffset, int yoffset, double zoom, Component obs) Draw the boards of the map at the given point and zoom factor onto the given Graphics objectvoiddrawBoardsInRegion(Graphics g, Rectangle visibleRect) For each Board overlapping the given region, update the appropriate section of the board image.voiddrawBoardsInRegion(Graphics g, Rectangle visibleRect, Component c) For each Board overlapping the given region, update the appropriate section of the board image.voiddrawDrawable(Graphics g, boolean aboveCounters) Draws all of our "Drawable" components.intdrawingToComponent(int c, double os_scale) Converts an integer value from Drawing coordinates to swing Component coordinates.drawingToComponent(Point p, double os_scale) Converts a Point from Drawing coordinates to swing Component coordinates.drawingToComponent(Rectangle r, double os_scale) Converts a Rectangle from Drawing coordinates to swing Component coordinates.intdrawingToMap(int c, double os_scale) Converts an integer value from Drawing coordinates to the Map's coordinate system.drawingToMap(Point p, double os_scale) Converts a Point from Drawing coordinates to the Map's coordinate system.drawingToMap(Rectangle r, double os_scale) Converts a Rectangle from Drawing coordinates to the Map's coordinate system.voiddrawPieces(Graphics g, int xOffset, int yOffset) Draws the map pieces at a given offsetvoiddrawPiecesInRegion(Graphics g, Rectangle visibleRect) Draws all pieces visible in a rectangular area of the mapvoiddrawPiecesInRegion(Graphics g, Rectangle visibleRect, Component c) Draws all pieces visible in a rectangular area of the mapvoiddrop(DropTargetDropEvent dtde) We put the "drop" in drag-n-drop!voidvoidSave all current Key Listeners and remove them from the map.voidEnsure that the given region (in map coordinates) is visible.findAnyPiece(Point pt, PieceFinder finder) Use the providedPieceFinderinstance to locate any piece at the given location, regardless of whether it is visible or not.findPiece(Point pt, PieceFinder finder) Use the providedPieceFinderinstance to locate a visible piece at the given locationfindRegion(String name) Search on all boards for a Region (location on an Irregular Grid) with the given nameSearch on all boards for a Zone with the given nameClass<?>[]List of subcomponents which can be added to a Map.String[]This getAttributeDescriptions() will return the items specific to the Toolbar Button - classes extending this should add their own items as well.String[]Lists all the buildFile (XML) attribute names for this component.Class<?>[]This getAttributeTypes() will return the items specific to the Toolbar Button - classes extending this should add their own items as well.Classes extending AbstractToolbarItem can call this as a super() method after checking for their own keys, to avoid needing to deal with the nitty gritty of the toolbar button.getBoardByName(String name) Searches our list of boards for one with the given nameintEvery map must include aBoardPickeras one of its build components.getChangeFormat(boolean noSuppress) The component to be added to the control window toolbarstatic StringGets the generic name for this type of class across all instances of it.Return the name of theDeckwhose position is precisely pprotected StringgetId()Each Map must have a unique String idMake a best guess for a unique identifier for the target.Return the localized name of theDeckwhose position is precisely pGets the value of map-level global property, or a module-level one if a map-level one is not found.protected PointgetLocation(int column, int row, double zoom) Finds the location of a board (in Map space) at a particular column and row, based on passed zoom factorgetLocation(Board b, double zoom) Gets the location of a board in Map space, based on a passed zoom factorprotected Point2DgetLocation2D(int column, int row, double zoom) getLocation2D(Board b, double zoom) static MapgetMapById(String id) Find the map that corresponds to a known unique idUtility method to return aListof all map components (on all maps!)intReturn the apply-on-move key.Return a unique Id for the containergetMutableProperty(String name) Find a contained Global Property (variable) by name.floatgetProperty(Object key) Gets the value of a map-level global property.Override this method to provide a list of properties to be exposed for use by expressions in the module.As aGameComponent, Map does not have any action inherently needing to be taken for "restoring" itself for load/save and network play purposes (the locations of pieces, etc, are stored in the pieces, and are restored fromGameStatein itsGameState.getRestorePiecesCommand()method, which creates an AddPiece command for each piece).Every map must include a singleStackMetricsobject as one of its build components, which governs the visuals of stacking of GamePieces on the mapEvery map window has a toolbar, and this method returns swing toolbar component for this map.getView()doublegetZoom()If the map has aZoomer(seeMap.setZoomer(Zoomer)), then returns the Zoomer's current zoom factor.A map may include aZoomeras one of its build components.voidhideMap()intReturns the index of a piece.booleanstatic booleanbooleanbooleanbooleanbooleanbooleanisNotPieceDrag(Transferable trans) booleanbooleanbooleanIs this map visible to all players?Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.mapSize()intmapToComponent(int c) Converts an integer value from the Map's coordinate system to Component coordinates used for interactions between swing components.Converts a Point from the Map's coordinate system to Component coordinates used for interactions between swing components.Converts a Rectangle from the Map's coordinate system to Component coordinates used for interactions between swing components.intmapToDrawing(int c, double os_scale) Converts an integer value from the Map's coordinate system to Drawing coordinates for rendering.mapToDrawing(Point p, double os_scale) Converts a point from the Map's coordinate system to Drawing coordinates for rendering.mapToDrawing(Rectangle r, double os_scale) Converts a rectangle from the Map's coordinate system to Drawing coordinates for rendering.voidMouse events are first translated into map coordinates.voidMouse motion events are not forwarded to LocalMouseListeners or to listeners on the stack.voidvoidvoidMouse motion events are not forwarded to LocalMouseListeners or to listeners on the stackvoidMouse events are first translated into map coordinates.voidMouse events are first translated into map coordinates.voidpaintRegion(Graphics g, Rectangle visibleRect) Paints a specific region of the map, denoted by a Rectangle.voidpaintRegion(Graphics g, Rectangle visibleRect, Component c) Paints a specific region of the map, denoted by a Rectangle.Place a piece at the destination point.placeOrMerge(GamePiece p, Point pt) Move a piece to the destination point.voidMouseListeners on a map may be pushed and popped onto a stack.voidRemove the most recently pushed mouse listener only if it is the supplied listenervoidMouseListeners on a map may be pushed and popped onto a stack.voidremoveDrawComponent(Drawable theComponent) Unregister aDrawablecomponent from this mapvoidUnregisters this Map from itsBuildableparent (usually aGameModule), reversing the process ofMap.addTo(Buildable).voidvoidBecause MouseEvents are received in Component coordinates, it is inconvenient for MouseListeners on the map to have to translate to Map coordinates.Removes a new Global Property from this map.voidRemoves a piece from the mapvoidrepaint()Repaints the map.voidrepaint(boolean cf) Repaints the map.voidRepaint the given area, specified in map coordinatesprotected intscale(int c, double zoom) Scales an integer value to a zoom factorprotected PointScales a point to a zoom factorprotected RectangleScales a Rectangle to a zoom factorvoidscroll(int dx, int dy) Scrolls the map in the containing JScrollPane.voidscrollAtEdge(Point evtPt, int dist) Begin autoscrolling the map if the given point is within the given distance from a viewport edge.static voidsetActiveMap(Map m) Marks an ActiveMap for certain drag and drop operations, so that the map can be repainted when the operation is complete.voidsetAnyMouseoverDrawn(boolean flag) voidsetAttribute(String key, Object value) Sets a buildFile (XML) attribute value for this component.protected voidAdjusts the bounds() rectangle to account for the Board's relative position to other boards.voidsetBoardPicker(BoardPicker picker) Every map must include a singleBoardPickeras one of its build components.voidsetBoards(Collection<Board> c) Set the boards for this map.static voidsetChangeReportingEnabled(boolean b) Global Change Reporting control - used by Global Key Commands (seeGlobalCommand) to temporarily disable reporting while they run, if their "Suppress individual reports" option is selected.voidsetDragGestureListener(DragGestureListener dragGestureListener) This listener will be notified when a drag event is initiated, assuming that no MouseListeners are on the stack.voidsetDrawingMouseOver(boolean flag) voidvoidEach Map must have a unique String id Sets our unique ID (among Maps), so that e.g. commands sent to different maps don't inadvertently get confused when we send commands to other clients.voidRegisters the keyBufferer for this map (old way of scanning through components to find one is silly)voidsetMapName(String s) voidsetPieceCollection(PieceCollection pieces) voidsetPieceMover(PieceMover mover) Every map must include a singlePieceMovercomponent as one of its build components, which handles drag-and-drop behavior for the map.voidsetPieceOpacity(float pieceOpacity) voidsetPiecesVisible(boolean show) voidEvery map must include a singleStackMetricsas one of its build components, which governs the visuals of stacking of GamePieces on the map.voidCommon view setup code for Map and PrivateMap, which confusingly have different View classes that sharing the same namevoidA map may include a singleZoomeras one of its build components.voidshowMap()voidsideChanged(String oldSide, String newSide) Takes action when the local player has switched sides.Because MouseEvents are received in Component coordinates, it is inconvenient for MouseListeners on the map to have to translate to Map coordinates.voidAccepts the current actual center of the map as the new "preferred center" (e.g. if we scroll) Just not if suppressed after a zoom level change (we don't want zoom level changes to cause us to lose track of the user's preferred ceter point)voidUpdates the title bar of the current windowMethods inherited from class AbstractToolbarItem
addPropertyGateListener, addPropertyGateListener, checkDisabled, disableIfTrue, getLaunchButton, getNameKey, getPropertyList, isShowDisabledOptions, makeLaunchButton, propertyChange, removePropertyGateListener, setButtonTextKey, setHotKeyKey, setIconKey, setLaunchButton, setNameKey, setNamePrompt, setShowDisabledOptions, setTooltipKeyModifier and TypeMethodDescriptionprotected voidprotected voidaddPropertyGateListener(boolean dontCheck) If we have a disable-this-button property, set a listener on itvoidCheck our disable-this-button property and enable/disable our button as appropriate based on its valuevoiddisableIfTrue(boolean disable) protected Stringbooleanprotected LaunchButtonmakeLaunchButton(String tooltip, String button_text, String iconFile, ActionListener action) Create a standard toolbar launcher button for this itemvoidListens to our disable-this-button property; enables/disables our button as appropriate when it changesprotected voidRemove any existing disable-this-button propertyprotected voidsetButtonTextKey(String buttonTextKey) protected voidsetHotKeyKey(String hotKeyKey) protected voidsetIconKey(String iconKey) protected voidsetLaunchButton(LaunchButton launch) Sets launch button for this toolbar itemprotected voidsetNameKey(String nameKey) protected voidsetNamePrompt(String namePrompt) protected voidsetShowDisabledOptions(boolean show) protected voidsetTooltipKey(String tooltipKey) Methods inherited from class AbstractConfigurable
add, addPropertyChangeListener, getConfigureComponents, getConfigureName, getConfigurer, getExpressionList, getI18nData, getI18nPrefix, getLocalizedConfigureName, getTypeName, remove, removePropertyChangeListener, setAllAttributesUntranslatable, setAttributeTranslatable, setConfigureNameModifier and TypeMethodDescriptionvoidSet the owning translatable of this componentvoidAdd a PropertyChangeListener.ConfigureName is used, in particular, by the Editor to track the names of components, and is preferred byUniqueIdManager.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, buildString, getAllDescendantComponentsOf, getAncestor, getBuildables, getBuildComponents, getBuildElement, getComponents, getComponentsOf, getNonFolderAncestor, setAncestor, validateModifier and TypeMethodDescriptionvoidAdds all images used by this component AND any subcomponents to the collection<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.UseAbstractBuildable.getBuildables()instead.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) 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?Methods inherited from interface ToolBarComponent
updateToolbarButtonsModifier and TypeMethodDescriptiondefault voidUpdate the text labels in the toolbar's component buttons (for mutable button label support)Methods inherited from interface UniqueIdManager.Identifyable
getConfigureName
-
Constructor Details
-
WidgetMap
public WidgetMap()
-
-
Method Details
-
setup
public void setup(boolean show) Description copied from class:MapWhen a game is started, create a top-level window, if none exists. When a game is ended, remove all boards from the map.- Specified by:
setupin interfaceGameComponent- Overrides:
setupin classMap- Parameters:
show- true if a game is starting, false if a game is ending- See Also:
-
shouldDockIntoMainWindow
public boolean shouldDockIntoMainWindow()Widget maps are always undocked- Overrides:
shouldDockIntoMainWindowin classMap- Returns:
- whether this map should dock into the main window
-
getAttributeVisibility
Description copied from class:AbstractConfigurableBy default, all attributes are visible- Specified by:
getAttributeVisibilityin interfaceAutoConfigurable- Overrides:
getAttributeVisibilityin classMap- Parameters:
name- Name (key) of one of this component's attributes- Returns:
- Visibility condition for the corresponding component
-
getScroll
-