![]() |
Gridarta Editor
|
Dialog to export a new map file into an image file. More...
Public Member Functions | |
void | exportMapAsImageCancel () |
Action method for cancel. More... | |
void | exportMapAsImageCancelExport () |
Action method for cancel export. More... | |
ExportMapAsImageDialog (@NotNull final JFrame parent, @NotNull final ExportMapAsImageAction< G, A, R > exportMapAsImageAction, @NotNull final MapControl< G, A, R > mapControl) | |
Creates a new instance. More... | |
void | exportMapAsImageExport () |
Action method for okay. More... | |
File | getOutputFile () |
Returns the file for saving the image file. More... | |
boolean | isExportMapAsImageIncludeTiledMaps () |
Returns whether tiled maps are included in the image. More... | |
boolean | isIncludeTiledMaps () |
Returns whether to include tiled maps in the image file. More... | |
void | setExportMapAsImageIncludeTiledMaps (final boolean includeTiledMaps) |
Sets whether to include tiled maps in the image. More... | |
void | setValue (@Nullable final Object newValue) |
Static Protected Attributes | |
static final Preferences | PREFERENCES = Preferences.userNodeForPackage(MainControl.class) |
Preferences. More... | |
Private Member Functions | |
JPanel | createPanel () |
Creates the content panel of the dialog. More... | |
Private Attributes | |
final JButton | cancelButton = new JButton(ACTION_BUILDER.createAction(false, "exportMapAsImageCancel", this)) |
The button to cancel the dialog. More... | |
volatile boolean | cancelExport |
Whether the currently running export operation should be cancelled. More... | |
final JButton | cancelExportButton = new JButton(ACTION_BUILDER.createAction(false, "exportMapAsImageCancelExport", this)) |
The button to cancel the export. More... | |
final JDialog | dialog |
The dialog instance. More... | |
final JButton | exportButton = new JButton(ACTION_BUILDER.createAction(false, "exportMapAsImageExport", this)) |
The button to start the export. More... | |
final ExportMapAsImageAction< G, A, R > | exportMapAsImageAction |
The action to use for exporting the map. More... | |
boolean | includeTiledMaps = true |
Whether tiled maps are included in the image. More... | |
final AbstractButton | includeTiledMapsCheckbox = new JCheckBox(ACTION_BUILDER.createToggle(false, "exportMapAsImageIncludeTiledMaps", this)) |
Checkbox to select whether tiled maps are included in the image. More... | |
final MapControl< G, A, R > | mapControl |
The map to export. More... | |
final JFileField | outputFileField |
The file name of the image file. More... | |
final JLabel | previewImage = new JLabel() |
The preview image. More... | |
final JLabel | previewLabel = new JLabel() |
The preview label. More... | |
final JProgressBar | progressBar = new JProgressBar() |
The progress bar. More... | |
final JLabel | progressLabel = new JLabel() |
The progress label. More... | |
Static Private Attributes | |
static final ActionBuilder | ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder("net.sf.gridarta") |
Action Builder. More... | |
static final Pattern | PATTERN_PATH = Pattern.compile(".*/") |
Matches the path part of a map path. More... | |
static final int | PREVIEW_SIZE = 256 |
The size of the preview image in pixels. More... | |
static final long | serialVersionUID = 1L |
Serial Version UID. More... | |
Dialog to export a new map file into an image file.
Definition at line 66 of file ExportMapAsImageDialog.java.
net.sf.gridarta.gui.dialog.exportmap.ExportMapAsImageDialog< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.ExportMapAsImageDialog | ( | @NotNull final JFrame | parent, |
@NotNull final ExportMapAsImageAction< G, A, R > | exportMapAsImageAction, | ||
@NotNull final MapControl< G, A, R > | mapControl | ||
) |
Creates a new instance.
parent | the parent component of this dialog |
exportMapAsImageAction | the action to use for exporting the map |
mapControl | the map to export |
Definition at line 184 of file ExportMapAsImageDialog.java.
References net.sf.gridarta.model.mapmodel.MapFile.getMapPath(), net.sf.gridarta.model.mapmodel.MapFile.getMapsDir(), and net.sf.gridarta.model.mapmodel.AbsoluteMapPath.getPath().
|
private |
Creates the content panel of the dialog.
Definition at line 233 of file ExportMapAsImageDialog.java.
References net.sf.gridarta.gui.utils.GUIConstants.DIALOG_BORDER, net.sf.gridarta.model.mapmodel.MapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getMapArchObject(), net.sf.gridarta.model.mapmodel.MapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getMapFile(), net.sf.gridarta.model.mapcontrol.MapControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getMapModel(), and net.sf.gridarta.utils.ActionBuilderUtils.newLabel().
void net.sf.gridarta.gui.dialog.exportmap.ExportMapAsImageDialog< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.exportMapAsImageCancel | ( | ) |
Action method for cancel.
Definition at line 333 of file ExportMapAsImageDialog.java.
void net.sf.gridarta.gui.dialog.exportmap.ExportMapAsImageDialog< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.exportMapAsImageCancelExport | ( | ) |
Action method for cancel export.
Definition at line 341 of file ExportMapAsImageDialog.java.
void net.sf.gridarta.gui.dialog.exportmap.ExportMapAsImageDialog< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.exportMapAsImageExport | ( | ) |
Action method for okay.
Definition at line 265 of file ExportMapAsImageDialog.java.
References net.sf.gridarta.action.exportmap.ExportMapAsImageAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.exportMap(), net.sf.gridarta.gui.utils.JFileField.getFile(), and net.sf.gridarta.gui.utils.JFileField.setEnabled().
File net.sf.gridarta.gui.dialog.exportmap.ExportMapAsImageDialog< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getOutputFile | ( | ) |
Returns the file for saving the image file.
Definition at line 215 of file ExportMapAsImageDialog.java.
References net.sf.gridarta.gui.utils.JFileField.getFile().
boolean net.sf.gridarta.gui.dialog.exportmap.ExportMapAsImageDialog< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.isExportMapAsImageIncludeTiledMaps | ( | ) |
Returns whether tiled maps are included in the image.
Definition at line 359 of file ExportMapAsImageDialog.java.
boolean net.sf.gridarta.gui.dialog.exportmap.ExportMapAsImageDialog< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.isIncludeTiledMaps | ( | ) |
Returns whether to include tiled maps in the image file.
Definition at line 224 of file ExportMapAsImageDialog.java.
void net.sf.gridarta.gui.dialog.exportmap.ExportMapAsImageDialog< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.setExportMapAsImageIncludeTiledMaps | ( | final boolean | includeTiledMaps | ) |
Sets whether to include tiled maps in the image.
includeTiledMaps | whether tiled maps are included in the image |
Definition at line 367 of file ExportMapAsImageDialog.java.
void net.sf.gridarta.gui.dialog.exportmap.ExportMapAsImageDialog< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.setValue | ( | @Nullable final Object | newValue | ) |
Definition at line 346 of file ExportMapAsImageDialog.java.
|
staticprivate |
Action Builder.
Definition at line 82 of file ExportMapAsImageDialog.java.
|
private |
The button to cancel the dialog.
Definition at line 118 of file ExportMapAsImageDialog.java.
|
private |
Whether the currently running export operation should be cancelled.
Definition at line 176 of file ExportMapAsImageDialog.java.
|
private |
The button to cancel the export.
Definition at line 124 of file ExportMapAsImageDialog.java.
|
private |
The dialog instance.
Definition at line 130 of file ExportMapAsImageDialog.java.
|
private |
The button to start the export.
Definition at line 112 of file ExportMapAsImageDialog.java.
|
private |
The action to use for exporting the map.
Definition at line 100 of file ExportMapAsImageDialog.java.
|
private |
Whether tiled maps are included in the image.
Definition at line 171 of file ExportMapAsImageDialog.java.
|
private |
Checkbox to select whether tiled maps are included in the image.
Definition at line 136 of file ExportMapAsImageDialog.java.
|
private |
The map to export.
Definition at line 106 of file ExportMapAsImageDialog.java.
|
private |
The file name of the image file.
Definition at line 142 of file ExportMapAsImageDialog.java.
|
staticprivate |
Matches the path part of a map path.
Definition at line 94 of file ExportMapAsImageDialog.java.
|
staticprotected |
Preferences.
Definition at line 88 of file ExportMapAsImageDialog.java.
|
staticprivate |
The size of the preview image in pixels.
Definition at line 71 of file ExportMapAsImageDialog.java.
|
private |
The preview image.
Definition at line 166 of file ExportMapAsImageDialog.java.
|
private |
The preview label.
Definition at line 160 of file ExportMapAsImageDialog.java.
|
private |
The progress bar.
Definition at line 154 of file ExportMapAsImageDialog.java.
|
private |
The progress label.
Definition at line 148 of file ExportMapAsImageDialog.java.
|
staticprivate |
Serial Version UID.
Definition at line 76 of file ExportMapAsImageDialog.java.