|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.caff.maze.MazePropertyOwner
de.caff.maze.MazePaintProperties
public class MazePaintProperties
Properties describing how a maze is painted.
![]() |
![]() |
![]() |
![]() |
Nested Class Summary |
---|
Nested classes/interfaces inherited from class de.caff.maze.MazePropertyOwner |
---|
MazePropertyOwner.BooleanPropertyInformation, MazePropertyOwner.EnumPropertyInformation, MazePropertyOwner.InfoPropertyDisplay, MazePropertyOwner.IntegerPropertyInformation, MazePropertyOwner.PaintPropertyInformation |
Field Summary | |
---|---|
protected java.lang.String |
myKey
Key of this property. |
static java.lang.String |
PROPERTY_BACKGROUND_PAINT
Property key of Paint property of the background. |
static java.lang.String |
PROPERTY_CELL_BORDER_PAINT
Property key of Paint property of cell borders. |
static java.lang.String |
PROPERTY_INNER_BORDER_PAINT
Property key of Paint property of inner borders. |
static java.lang.String |
PROPERTY_OUTER_BORDER_PAINT
Property key of Paint property of outer border. |
static java.lang.String |
PROPERTY_SHOWING_CELL_BORDERS
Property key of boolean property describing whether cell borders are shown. |
static java.lang.String |
PROPERTY_SHOWING_SOLUTION
Property key of boolean property describing whether the solution is shown. |
static java.lang.String |
PROPERTY_SOLUTION_PAINT
Property key of Paint property of solution cells. |
static java.lang.String |
PROPERTY_WAY_END_PAINT
Property key of Paint property of the way end point. |
static java.lang.String |
PROPERTY_WAY_START_PAINT
Property key of Paint property of the way start point. |
Constructor Summary | |
---|---|
protected |
MazePaintProperties(java.lang.String myKey)
Constructor. |
Method Summary | |
---|---|
java.awt.Paint |
getBackgroundPaint()
Get the background paint. |
java.awt.Paint |
getCellBorderPaint()
Get the paint of cell borders. |
static MazePaintProperties |
getDrawMazePaintProperties(DataStorage systemAccess)
Get paint properties. |
java.awt.Paint |
getInnerWallsPaint()
Get the paint of the inner borders. |
java.awt.Paint |
getOuterWallPaint()
Get the paint of the outer border. |
java.util.Collection<PropertyInformation> |
getPropertyInformations()
Get the property informations. |
static MazePaintProperties |
getSaveMazePaintProperties(DataStorage systemAccess)
Get paint properties for saving the maze as an image. |
java.awt.Paint |
getSolutionPaint()
Get the paint of solution cells. |
java.awt.Paint |
getWayEndPaint()
Get the paint for the end cell. |
java.awt.Paint |
getWayStartPaint()
Get the paint for the start cell. |
boolean |
isShowingCellBorders()
Are cell borders displayed? |
boolean |
isShowingSolution()
Is the solution displayed? |
(package private) void |
overwriteFromPersistentData(DataStorage dataStorage)
Overwrite the properties from the given data storage. |
void |
setBackgroundPaint(java.awt.Paint backgroundPaint)
Set the background paint. |
void |
setCellBorderPaint(java.awt.Paint cellBorderPaint)
Set the paint of cell borders. |
void |
setInnerBorderPaint(java.awt.Paint innerBorderPaint)
Set the paint of the inner borders. |
void |
setOuterBorderPaint(java.awt.Paint outerBorderPaint)
Set the paint of the outer border. |
void |
setShowingCellBorders(boolean showingCellBorders)
Set whether cell borders are displayed. |
void |
setShowingSolution(boolean show)
Set whether the solution is displayed. |
void |
setSolutionPaint(java.awt.Paint solutionPaint)
Set the paint of solution cells. |
void |
setWayEndPaint(java.awt.Paint wayEndPaint)
Set the paint for the end cell. |
void |
setWayStartPaint(java.awt.Paint wayStartPaint)
Set the paint for the start cell. |
(package private) void |
storePersistentData(DataStorage dataStorage)
Store the settings in a data storage. |
Methods inherited from class de.caff.maze.MazePropertyOwner |
---|
addPropertyChangeListener, firePropertyChange, removePropertyChangeListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PROPERTY_SHOWING_SOLUTION
public static final java.lang.String PROPERTY_SHOWING_CELL_BORDERS
public static final java.lang.String PROPERTY_OUTER_BORDER_PAINT
public static final java.lang.String PROPERTY_INNER_BORDER_PAINT
public static final java.lang.String PROPERTY_CELL_BORDER_PAINT
public static final java.lang.String PROPERTY_SOLUTION_PAINT
public static final java.lang.String PROPERTY_WAY_START_PAINT
public static final java.lang.String PROPERTY_WAY_END_PAINT
public static final java.lang.String PROPERTY_BACKGROUND_PAINT
protected final java.lang.String myKey
Constructor Detail |
---|
protected MazePaintProperties(java.lang.String myKey)
myKey
- resource keyMethod Detail |
---|
public static MazePaintProperties getDrawMazePaintProperties(DataStorage systemAccess)
systemAccess
- system access used to overwrite default settings
public static MazePaintProperties getSaveMazePaintProperties(DataStorage systemAccess)
systemAccess
- system access used to overwrite default settings
public void setShowingSolution(boolean show)
show
- show the solution?public boolean isShowingSolution()
isShowingSolution
in interface MazePaintPropertiesProvider
public boolean isShowingCellBorders()
isShowingCellBorders
in interface MazePaintPropertiesProvider
public void setShowingCellBorders(boolean showingCellBorders)
showingCellBorders
- display cell borders?public java.awt.Paint getOuterWallPaint()
getOuterWallPaint
in interface MazePaintPropertiesProvider
public void setOuterBorderPaint(java.awt.Paint outerBorderPaint)
outerBorderPaint
- new outer border paintpublic java.awt.Paint getInnerWallsPaint()
getInnerWallsPaint
in interface MazePaintPropertiesProvider
public void setInnerBorderPaint(java.awt.Paint innerBorderPaint)
innerBorderPaint
- inner border paintpublic java.awt.Paint getCellBorderPaint()
getCellBorderPaint
in interface MazePaintPropertiesProvider
MazePaintProperties.isShowingCellBorders()
public void setCellBorderPaint(java.awt.Paint cellBorderPaint)
cellBorderPaint
- cell border paintMazePaintProperties.isShowingCellBorders()
public java.awt.Paint getSolutionPaint()
getSolutionPaint
in interface MazePaintPropertiesProvider
MazePaintProperties.isShowingSolution()
public void setSolutionPaint(java.awt.Paint solutionPaint)
solutionPaint
- solution cell paintMazePaintProperties.isShowingSolution()
public java.awt.Paint getBackgroundPaint()
getBackgroundPaint
in interface MazePaintPropertiesProvider
public void setBackgroundPaint(java.awt.Paint backgroundPaint)
backgroundPaint
- background paintpublic java.awt.Paint getWayStartPaint()
getWayStartPaint
in interface MazePaintPropertiesProvider
public void setWayStartPaint(java.awt.Paint wayStartPaint)
wayStartPaint
- start cell paintpublic java.awt.Paint getWayEndPaint()
getWayEndPaint
in interface MazePaintPropertiesProvider
public void setWayEndPaint(java.awt.Paint wayEndPaint)
wayEndPaint
- end cell paintpublic java.util.Collection<PropertyInformation> getPropertyInformations()
getPropertyInformations
in class MazePropertyOwner
void overwriteFromPersistentData(DataStorage dataStorage)
dataStorage
- data storage to use for access to stored settingsvoid storePersistentData(DataStorage dataStorage)
dataStorage
- storage to store to
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |