|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.argouml.uml.diagram.DiagramSettings
public class DiagramSettings
Diagram appearance settings. This includes basic things like colors and
fonts, as well as the NotationSettings which contain all the settings
that control text formatting.
The settings are designed to work in a hierarchical fashion with any settings that are defaulted at the current level inheriting from the next level in the hierarchy. A typical hierarchy would be Fig->StyleSheet->Project where a style sheet is a named set of attributes that can be applied as a set to a fig (perhaps in conjunction with a stereotype). The hierarchy which is currently used in ArgoUML is Fig->Diagram->Project, although there's no support for changing anything but the Project (and a few of the attributes managed directly by GEF).
Notation settings have a semantic meaning in the UML, which defines the difference between notation settings and diagram appearance settings.
| Nested Class Summary | |
|---|---|
static class |
DiagramSettings.StereotypeStyle
Enumeration representing different stereotype presentation styles |
| Constructor Summary | |
|---|---|
DiagramSettings()
Construct an empty diagram settings with no parent and all values defaulted. |
|
DiagramSettings(DiagramSettings parentSettings)
Construct a DiagramSettings object which inherits from the given parent settings (e.g. |
|
| Method Summary | |
|---|---|
int |
getDefaultShadowWidth()
|
DiagramSettings.StereotypeStyle |
getDefaultStereotypeView()
|
int |
getDefaultStereotypeViewInt()
Deprecated. for 0.27.2 by tfmorris. For backward compatibility only. |
java.awt.Font |
getFont(int fontStyle)
Utility function to convert a font style integer into a Font. |
java.awt.Font |
getFontBold()
Returns the Bold diagram font which corresponds to selected parameters. |
java.awt.Font |
getFontBoldItalic()
Returns the Bold-Italic diagram font which corresponds to selected parameters. |
java.awt.Font |
getFontItalic()
Returns the Italic diagram font which corresponds to selected parameters. |
java.lang.String |
getFontName()
Diagram font name. |
java.awt.Font |
getFontPlain()
Returns the Plain diagram font which corresponds to selected parameters. |
int |
getFontSize()
Diagram font size. |
NotationSettings |
getNotationSettings()
|
void |
initFromConfiguration()
Initialize the diagram settings with application default values from the Configuration retrieved from disk. |
boolean |
isShowBidirectionalArrows()
|
boolean |
isShowBoldNames()
|
void |
notifyOfChangedSettings()
Send all events when the settings are changed to refresh anything rendered with these settings. |
void |
setDefaultShadowWidth(int newWidth)
|
void |
setDefaultStereotypeView(DiagramSettings.StereotypeStyle newView)
|
void |
setDefaultStereotypeView(int newView)
Deprecated. for 0.27.2 by tfmorris. Not for use in new code. Only for help in transitioning to enum based methods. Use setDefaultStereotypeView(StereotypeStyle). |
void |
setFontName(java.lang.String newFontName)
Diagram font name. |
void |
setFontSize(int newFontSize)
Diagram font size. |
void |
setNotationSettings(NotationSettings notationSettings)
|
void |
setShowBidirectionalArrows(boolean showem)
|
void |
setShowBoldNames(boolean showem)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DiagramSettings()
public DiagramSettings(DiagramSettings parentSettings)
parentSettings - settings to inherit from if default values aren't
overridden.| Method Detail |
|---|
public void notifyOfChangedSettings()
public void initFromConfiguration()
public NotationSettings getNotationSettings()
public void setNotationSettings(NotationSettings notationSettings)
notationSettings - The notationSettings to set.public boolean isShowBoldNames()
true if we show bold names.public void setShowBoldNames(boolean showem)
showem - true if names are to be shown in bold font.public boolean isShowBidirectionalArrows()
true if we show the arrows when
both association ends of an association are navigable.public void setShowBidirectionalArrows(boolean showem)
showem - true if both arrows are to be shown when
both association ends of an association are navigable.public int getDefaultShadowWidth()
public void setDefaultShadowWidth(int newWidth)
newWidth - The Shadow Width.public DiagramSettings.StereotypeStyle getDefaultStereotypeView()
public int getDefaultStereotypeViewInt()
public void setDefaultStereotypeView(int newView)
setDefaultStereotypeView(StereotypeStyle).
newView - the default stereotype viewpublic void setDefaultStereotypeView(DiagramSettings.StereotypeStyle newView)
newView - the default stereotype viewpublic java.lang.String getFontName()
public void setFontName(java.lang.String newFontName)
newFontName - diagram font name.public int getFontSize()
public void setFontSize(int newFontSize)
newFontSize - diagram font size.public java.awt.Font getFontPlain()
public java.awt.Font getFontItalic()
public java.awt.Font getFontBold()
public java.awt.Font getFontBoldItalic()
public java.awt.Font getFont(int fontStyle)
fontStyle - the style; see the predefined constants in Font
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
| ArgoUML © 1996-2006 | ArgoUML Homepage | ArgoUML Developers' page | ArgoUML Cookbook |