Gridarta Editor
LayoutInfo.java
Go to the documentation of this file.
1 /*
2  * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games.
3  * Copyright (C) 2000-2023 The Gridarta Developers.
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License along
16  * with this program; if not, write to the Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18  */
19 
20 package net.sf.gridarta.action.exportmap;
21 
23 import org.jetbrains.annotations.NotNull;
24 
28 public class LayoutInfo {
29 
33  @NotNull
34  private final MapFile mapFile;
35 
41  private final int x;
42 
48  private final int y;
49 
58  public LayoutInfo(@NotNull final MapFile mapFile, final int x, final int y) {
59  this.mapFile = mapFile;
60  this.x = x;
61  this.y = y;
62  }
63 
68  @NotNull
69  public MapFile getMapFile() {
70  return mapFile;
71  }
72 
79  public int getX() {
80  return x;
81  }
82 
89  public int getY() {
90  return y;
91  }
92 
93  @NotNull
94  @Override
95  public String toString() {
96  return mapFile + ": " + x + "/" + y;
97  }
98 
99 }
net.sf.gridarta.action.exportmap.LayoutInfo.LayoutInfo
LayoutInfo(@NotNull final MapFile mapFile, final int x, final int y)
Creates a new instance.
Definition: LayoutInfo.java:58
net.sf.gridarta.action.exportmap.LayoutInfo.getY
int getY()
Returns the y coordinate of the top border of the map within the final image.
Definition: LayoutInfo.java:89
net.sf.gridarta
Base package of all Gridarta classes.
net.sf
net.sf.gridarta.model.mapmodel
Definition: AboveFloorInsertionMode.java:20
net.sf.gridarta.action.exportmap.LayoutInfo.mapFile
final MapFile mapFile
The MapFile that identifies the map.
Definition: LayoutInfo.java:34
net
net.sf.gridarta.action.exportmap.LayoutInfo.x
final int x
The x coordinate of the left border of the map within the final image.
Definition: LayoutInfo.java:41
net.sf.gridarta.action.exportmap.LayoutInfo.toString
String toString()
Definition: LayoutInfo.java:95
net.sf.gridarta.action.exportmap.LayoutInfo.y
final int y
The y coordinate of the top border of the map within the final image.
Definition: LayoutInfo.java:48
net.sf.gridarta.model.mapmodel.MapFile
The location of a map file with a map directory.
Definition: MapFile.java:31
net.sf.gridarta.model
net.sf.gridarta.action.exportmap.LayoutInfo.getX
int getX()
Returns the x coordinate of the left border of the map within the final image.
Definition: LayoutInfo.java:79
net.sf.gridarta.action.exportmap.LayoutInfo.getMapFile
MapFile getMapFile()
Returns the MapFile that identifies the map.
Definition: LayoutInfo.java:69
net.sf.gridarta.action.exportmap.LayoutInfo
Stores layout information for maps.
Definition: LayoutInfo.java:28