20 package net.sf.gridarta.action;
22 import javax.swing.Action;
26 import net.
sf.japi.swing.action.ActionMethod;
27 import net.
sf.japi.swing.action.ToggleAction;
28 import org.jetbrains.annotations.NotNull;
29 import org.jetbrains.annotations.Nullable;
58 public void gridVisibleChanged(
final boolean gridVisible) {
62 public void lightVisibleChanged(
final boolean lightVisible) {
67 public void smoothingChanged(
final boolean smoothing) {
71 public void tileStretchingChanged(
final boolean tileStretching) {
75 public void doubleFacesChanged(
final boolean doubleFaces) {
79 public void alphaTypeChanged(
final int alphaType) {
83 public void editTypeChanged(
final int editType) {
87 public void autojoinChanged(
final boolean autojoin) {
123 public void setAction(@NotNull
final Action action, @NotNull
final String name) {
124 this.action = (ToggleAction) action;
135 private boolean doLightVisible(
final boolean performAction,
final boolean lightVisible) {
147 if (action != null) {
An EditorAction that toggles whether map lighting is visible.
ToggleAction action
The ToggleAction associated with this editor action.
void setLightVisible(final boolean lightVisible)
Sets whether the light of the current map should be visible.
final MapViewSettings mapViewSettings
The MapViewSettings instance to use.
LightVisibleAction(@NotNull final MapViewSettings mapViewSettings)
Creates a new instance.
boolean isLightVisible()
Get the visibility of the light.
final MapViewSettingsListener mapViewSettingsListener
The MapViewSettingsListener attached to mapViewSettings.
void addMapViewSettingsListener(@NotNull MapViewSettingsListener listener)
Register a MapViewSettingsListener.
Base package of all Gridarta classes.
void setAction(@NotNull final Action action, @NotNull final String name)
Sets the Action instance for this editor action.
Interface for event listeners that are interested in changes on MapViewSettings.
void setLightVisible(boolean lightVisible)
Set the visibility of the light.
Container for settings that affect the rendering of maps.
boolean isLightVisible()
Action method for "light visible".
void updateAction()
Updates the action's state.
boolean doLightVisible(final boolean performAction, final boolean lightVisible)
Executes the "light visible" action.