|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openstreetmap.josm.gui.io.SaveLayerInfo
class SaveLayerInfo
SaveLayerInfo represents the information, user preferences and save/upload states of a layer which might be uploaded/saved.
| Field Summary | |
|---|---|
private boolean |
doSaveToFile
|
private boolean |
doUploadToServer
|
private java.io.File |
file
|
private OsmDataLayer |
layer
the osm data layer |
private UploadOrSaveState |
saveState
|
private UploadOrSaveState |
uploadState
|
| Constructor Summary | |
|---|---|
SaveLayerInfo(OsmDataLayer layer)
|
|
| Method Summary | |
|---|---|
int |
compareTo(SaveLayerInfo o)
|
java.io.File |
getFile()
Replies the file this layer should be saved to, if isDoSaveToFile() is true |
OsmDataLayer |
getLayer()
Replies the layer this info objects holds information for |
java.lang.String |
getName()
Replies the name of the layer |
UploadOrSaveState |
getSaveState()
Replies the save state of getLayer(). |
UploadOrSaveState |
getUploadState()
Replies the upload state of getLayer(). |
boolean |
isDoSaveAndUpload()
Replies true if this layer should be uploaded to the server and saved to file. |
boolean |
isDoSaveToFile()
Replies true if this layer should be saved to a file; false, otherwise |
boolean |
isDoUploadToServer()
Replies true if this layer should be uploaded to the server; false, otherwise |
void |
resetUploadAndSaveState()
Resets the upload and save state |
void |
setDoSaveToFile(boolean doSaveToFile)
Sets whether this layer should be saved to a file |
void |
setDoUploadToServer(boolean doUploadToServer)
Sets whether this layer should be uploaded to a file |
void |
setFile(java.io.File file)
Sets the file this layer should be saved to, if isDoSaveToFile() is true |
void |
setSaveState(UploadOrSaveState saveState)
Sets the save state for getLayer() |
void |
setUploadState(UploadOrSaveState uploadState)
Sets the upload state for getLayer() |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private OsmDataLayer layer
private boolean doSaveToFile
private boolean doUploadToServer
private java.io.File file
private UploadOrSaveState uploadState
private UploadOrSaveState saveState
| Constructor Detail |
|---|
public SaveLayerInfo(OsmDataLayer layer)
layer - the layer. Must not be null.
java.lang.IllegalArgumentException - thrown if layer is null| Method Detail |
|---|
public OsmDataLayer getLayer()
public boolean isDoSaveToFile()
public void setDoSaveToFile(boolean doSaveToFile)
doSaveToFile - true to save; false, to skip savingpublic boolean isDoUploadToServer()
public void setDoUploadToServer(boolean doUploadToServer)
doSaveToFile - true to upload; false, to skip uploadingpublic boolean isDoSaveAndUpload()
public java.lang.String getName()
public java.io.File getFile()
isDoSaveToFile() is true
isDoSaveToFile() is truepublic void setFile(java.io.File file)
isDoSaveToFile() is true
file - the filepublic int compareTo(SaveLayerInfo o)
compareTo in interface java.lang.Comparable<SaveLayerInfo>public UploadOrSaveState getUploadState()
getLayer().
UploadOrSaveState.OK if #getLayer() was successfully uploaded
public void setUploadState(UploadOrSaveState uploadState)
getLayer()
uploadState - the upload statepublic UploadOrSaveState getSaveState()
getLayer().
UploadOrSaveState.OK if #getLayer() was successfully saved to file
public void setSaveState(UploadOrSaveState saveState)
getLayer()
saveState - save the upload statepublic void resetUploadAndSaveState()
setUploadState(UploadOrSaveState),
setSaveState(UploadOrSaveState),
getUploadState(),
getSaveState()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||