|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.palamedes.ui.preferences.stylesheets.StylesheetPersistenceData
public class StylesheetPersistenceData
StylesheetPersistenceData stores information about a style sheet. It uniquely references contributed style sheets via their id. Contributed templates may be deleted or modified.
Constructor Summary | |
---|---|
StylesheetPersistenceData(Stylesheet stylesheet,
boolean enabled)
Creates a new, user-added instance that is not linked to a contributed style sheet. |
|
StylesheetPersistenceData(Stylesheet stylesheet,
boolean enabled,
java.lang.String id)
Creates a new instance. |
Method Summary | |
---|---|
java.lang.String |
getId()
Returns the id of this style sheet store, or null if there
is none. |
Stylesheet |
getStylesheet()
Returns the style sheet encapsulated by the receiver. |
boolean |
isCustom()
Returns whether the receiver represents a custom style sheet, i.e. is either a user-added style sheet or a contributed style sheet that has been modified. |
boolean |
isDeleted()
Returns the deletion state of the stored style sheet. |
boolean |
isEnabled()
Returns the enablement state of the contained template. |
boolean |
isModified()
Returns whether the receiver represents a modified style sheet, i.e. a contributed style sheet that has been changed. |
boolean |
isUserAdded()
Returns true if the contained style sheet was added by a
user, i.e. does not reference a contributed style sheet. |
void |
revert()
Reverts the template to its original setting. |
void |
setDeleted(boolean isDeleted)
Sets the deletion state of the stored style sheet. |
void |
setEnabled(boolean isEnabled)
Sets the enablement state of the contained style sheet. |
void |
setStylesheet(Stylesheet stylesheet)
Sets the template encapsulated by the receiver. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StylesheetPersistenceData(Stylesheet stylesheet, boolean enabled)
stylesheet
- the style sheet which is stored by the new instanceenabled
- whether the style sheet is enabledpublic StylesheetPersistenceData(Stylesheet stylesheet, boolean enabled, java.lang.String id)
id
is not null
,
the instance is represents a style sheet that is contributed and can be
identified via its id.
stylesheet
- the style sheet which is stored by the new instanceenabled
- whether the style sheet is enabledid
- the id of the style sheet, or null
if a user-added
instance should be createdMethod Detail |
---|
public java.lang.String getId()
null
if there
is none.
public boolean isDeleted()
public void setDeleted(boolean isDeleted)
isDeleted
- the deletion state of the stored style sheetpublic Stylesheet getStylesheet()
public void setStylesheet(Stylesheet stylesheet)
public boolean isCustom()
true
if the contained style sheet is a custom
style sheet and cannot be reconstructed from the contributed
style sheetspublic boolean isModified()
true
if the contained style sheet is contributed but
has been modified, false
otherwisepublic boolean isUserAdded()
true
if the contained style sheet was added by a
user, i.e. does not reference a contributed style sheet.
true
if the contained style sheet was added by a
user, false
otherwisepublic void revert()
public boolean isEnabled()
public void setEnabled(boolean isEnabled)
isEnabled
- the new enablement state of the contained style sheet
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |