public class Project extends LocalizedObject implements java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<Project>, java.io.ObjectInputValidation
| Modifier and Type | Field and Description |
|---|---|
static double |
DEFAULT_MAXIMUM_SCALE |
static double |
DEFAULT_MINIMUM_SCALE |
| Constructor and Description |
|---|
Project(int id)
Constructs a new Project object with the specified parameters.
|
Project(int id,
java.lang.String name,
java.lang.String desc,
JMapUnit mapUnit,
JMapUnit distanceUnit,
OrientedRectangle viewBounds)
Constructs a new Project object with the specified parameters.
|
Project(int id,
java.lang.String name,
java.lang.String desc,
JMapUnit mapUnit,
JMapUnit distanceUnit,
OrientedRectangle viewBounds,
JMapUnit displayUnit)
Constructs a new Project object with the specified parameters.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone()
Overrides clone to return a new instance of Project that is the exact copy
of the caller
|
int |
compareTo(Project o)
Implementation of the interface Comparable
|
java.util.List<java.lang.String> |
getAvailableLanguages() |
java.lang.String |
getDefaultLanguage() |
ViewSettings |
getDefaultViewSettings()
Gets a ViewSetting instance containing the default view settings.
|
java.lang.String |
getDescription()
Gets the description.
|
java.lang.String |
getDescription(java.util.Locale locale)
Gets the description of this project for a specific locale.
|
JMapUnit |
getDistanceUnit()
Retrieves the unit used in the project
|
int |
getId()
Gets the project id.
|
java.awt.Color |
getInitialBGColor()
Retrieves the default background color of the project
|
OrientedRectangle |
getInitialExtent()
Retrieves the bounding area of the project
|
OrientedRectangle |
getInitialViewBounds()
Deprecated.
use getInitialExtent() instead.
|
JMapUnit |
getMapUnit()
Retrieves the unit used in the project
|
OrientedRectangle |
getMaximumExtent()
Retrieves the defined maximum area of the project.
|
double |
getMaximumScale()
Retrieves the maximum scale of the project.
|
double |
getMinimumScale()
Retrieves the minimum scale of the project.
|
java.lang.String |
getName()
Gets the name of this project.
|
java.lang.String |
getName(java.util.Locale locale)
Gets the name of this project for a specific locale.
|
boolean |
getPreventLabelsOverlapping()
Returns the value of the preventLabelsOverlapping flag.
|
boolean |
isNamed(java.lang.String value)
Checks if the project is named (including available translations, case
insensitive) as the specified value.
|
void |
removeTranslationsOtherThan(java.util.Locale[] locales)
Removes any
Locale from this object that are not in the specified locales. |
void |
setDescription(java.lang.String description)
Sets the Description
|
void |
setDescription(java.lang.String description,
java.util.Locale locale)
Sets the description of this project for the specified Locale.
|
void |
setDistanceUnit(JMapUnit unit)
Sets the unit used in the project
|
void |
setId(int id)
Sets the project id.
|
void |
setInitialBGColor(java.awt.Color color)
Sets the default background color of the project
|
void |
setInitialExtent(OrientedRectangle extent)
Sets the bounding area of the project
|
void |
setInitialViewBounds(OrientedRectangle extent)
Deprecated.
use setInitialExtent(OrientedRectangle extent) instead.
|
void |
setMapUnit(JMapUnit unit)
Sets the unit used in the project
|
void |
setMaximumExtent(OrientedRectangle extent)
Sets the defined maximum area of the project.
|
void |
setMaximumScale(double maximumScale)
Sets the maximum scale of the project.
|
void |
setMinimumScale(double minimumScale)
Sets the minimum scale of the project.
|
void |
setName(java.lang.String name)
Sets the name of this project.
|
void |
setName(java.lang.String name,
java.util.Locale locale)
Sets the name of this project for the specified Locale.
|
void |
setPreventLabelsOverlapping(boolean flag)
Sets the value of the preventLabelsOverlapping flag.
|
java.lang.String |
toString() |
void |
update(Project project)
This method update the project by setting the appropriate instance
variable.
|
void |
validateObject() |
getAvailableLocales, getTranslation, isTranslationExists, setTranslation, updateTranslationspublic static final double DEFAULT_MINIMUM_SCALE
public static final double DEFAULT_MAXIMUM_SCALE
public Project(int id,
java.lang.String name,
java.lang.String desc,
JMapUnit mapUnit,
JMapUnit distanceUnit,
OrientedRectangle viewBounds,
JMapUnit displayUnit)
id - the unique id of the projectname - the name of the projectdesc - the description of the projectmapUnit - the unit of the projectdistanceUnit - the distance unit of the projectviewBounds - the bounding area of the data in the projectdisplayUnit - the display unit for the viewpublic Project(int id,
java.lang.String name,
java.lang.String desc,
JMapUnit mapUnit,
JMapUnit distanceUnit,
OrientedRectangle viewBounds)
id - the unique id of the projectname - the name of the projectdesc - the description of the projectmapUnit - the unit of the projectviewBounds - the bounding area of the data in the projectpublic Project(int id)
id - the unique id of the projectpublic OrientedRectangle getInitialExtent()
@Deprecated public OrientedRectangle getInitialViewBounds()
public void setInitialExtent(OrientedRectangle extent)
extent - the new bounding area of the projectOrientedRectangle@Deprecated public void setInitialViewBounds(OrientedRectangle extent)
public OrientedRectangle getMaximumExtent()
public void setMaximumExtent(OrientedRectangle extent)
extent - the new defined maximum area of the projectOrientedRectanglepublic JMapUnit getMapUnit()
JMapUnitpublic void setMapUnit(JMapUnit unit)
unit - the new unit used in the projectJMapUnitpublic JMapUnit getDistanceUnit()
JMapUnitpublic void setDistanceUnit(JMapUnit unit)
unit - the new unit used in the projectJMapUnitpublic java.awt.Color getInitialBGColor()
public void setInitialBGColor(java.awt.Color color)
color - background color of the directorypublic double getMaximumScale()
public void setMaximumScale(double maximumScale)
maximumScale - the maximum scale to set.public double getMinimumScale()
public void setMinimumScale(double minimumScale)
minimumScale - the minimum scale to set.public int getId()
public void setId(int id)
id - the new project id.public java.lang.String getName()
public java.lang.String getName(java.util.Locale locale)
locale - public void setName(java.lang.String name)
name - the new given name.public void setName(java.lang.String name,
java.util.Locale locale)
name - the new given name.locale - the locale for this namepublic java.lang.String getDescription()
public java.lang.String getDescription(java.util.Locale locale)
locale - public void setDescription(java.lang.String description)
description - the associated description string.public void setDescription(java.lang.String description,
java.util.Locale locale)
description - the new given description.locale - the locale for this descriptionpublic void update(Project project)
project - the project instance containing the data that needs to be updated.public ViewSettings getDefaultViewSettings()
ViewSettingspublic java.lang.Object clone()
clone in class java.lang.Objectpublic void setPreventLabelsOverlapping(boolean flag)
public boolean getPreventLabelsOverlapping()
public java.lang.String toString()
toString in class java.lang.Objectpublic int compareTo(Project o)
compareTo in interface java.lang.Comparable<Project>o - the object to compare withpublic void validateObject()
validateObject in interface java.io.ObjectInputValidationpublic java.lang.String getDefaultLanguage()
public java.util.List<java.lang.String> getAvailableLanguages()
public boolean isNamed(java.lang.String value)
value - public void removeTranslationsOtherThan(java.util.Locale[] locales)
LocalizedObjectLocale from this object that are not in the specified locales.
locales[0] should be the default languageremoveTranslationsOtherThan in class LocalizedObject