org.eclipse.gmt.modisco.infra.browser.uicore
Class CustomizationManager

java.lang.Object
  extended by org.eclipse.gmt.modisco.infra.browser.uicore.CustomizationManager

public class CustomizationManager
extends java.lang.Object

This is a facade to the CustomizationEngine, AppearanceConfiguration, and FacetContext. An instance of this class must be passed to CustomizableModelContentProvider and CustomizableModelLabelProvider.

Note that you must call installCustomPainter for all customizations to be displayed properly.


Constructor Summary
CustomizationManager()
           
 
Method Summary
 void clearCustomizations()
          Removes all customizations
 void clearFacets()
          Removes all Facets
 Font getCustomFont()
           
 Font getCustomItalicFont()
           
 int getFontSizeDelta()
           
 java.util.List<MetamodelView> getRegisteredCustomizations()
          Get registered customizations
 void installCustomPainter(Tree tree)
          Install a CustomTreePainter on the given Tree.
 boolean isShowAttributes()
           
 boolean isShowContainer()
           
 boolean isShowDerivedLinks()
           
 boolean isShowElementIDs()
           
 boolean isShowEmptyAttributes()
           
 boolean isShowEmptyLinks()
           
 boolean isShowFullQualifiedNames()
           
 boolean isShowMultiplicity()
           
 boolean isShowOppositeLinks()
           
 boolean isShowOrdering()
           
 boolean isShowTypeOfLinks()
           
 boolean isShowURI()
           
 boolean isSortInstances()
           
 boolean isSortLinks()
           
 boolean isSortLinksByType()
           
 void loadCustomizations()
          Loads or reloads the customizations registered by registerCustomization.
 void loadFacet(Facet facet)
          Loads the given Facet.
 void registerCustomization(MetamodelView customization)
          Adds the given customization to the engine.
 void setCustomFont(Font customFont)
           
 void setCustomItalicFont(Font customItalicFont)
           
 void setFontSizeDelta(int value)
           
 void setShowAttributes(boolean value)
           
 void setShowContainer(boolean showContainer)
           
 void setShowDerivedLinks(boolean showDerivedLinks)
           
 void setShowElementIDs(boolean showElementIDs)
           
 void setShowEmptyAttributes(boolean value)
           
 void setShowEmptyLinks(boolean showEmptyLinks)
           
 void setShowFullQualifiedNames(boolean showFullQualifiedNames)
           
 void setShowMultiplicity(boolean showMultiplicity)
           
 void setShowOppositeLinks(boolean showOppositeLinks)
           
 void setShowOrdering(boolean value)
           
 void setShowTypeOfLinks(boolean value)
           
 void setShowURI(boolean showURI)
           
 void setSortInstances(boolean sortInstances)
           
 void setSortLinks(boolean value)
           
 void setSortLinksByType(boolean value)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CustomizationManager

public CustomizationManager()
Method Detail

installCustomPainter

public void installCustomPainter(Tree tree)
Install a CustomTreePainter on the given Tree.

This custom painter is necessary to display some customizations, like underlined, struckthrough, and Facet overlay icons.


registerCustomization

public void registerCustomization(MetamodelView customization)
Adds the given customization to the engine. Once all customizations are added, loadCustomizations must be called to effectively load the registered customizations.

Customizations should be retrieved from the CustomizationsCatalog.

Parameters:
customization - a customization root object, defined from metamodel "http://www.eclipse.org/MoDisco/infra/browser/custom/0.8".

loadCustomizations

public void loadCustomizations()
Loads or reloads the customizations registered by registerCustomization.

note: this method should be called after all Facets are loaded, because customizations can reference Facets.


clearCustomizations

public void clearCustomizations()
Removes all customizations


getRegisteredCustomizations

public java.util.List<MetamodelView> getRegisteredCustomizations()
Get registered customizations


loadFacet

public void loadFacet(Facet facet)
Loads the given Facet.

Facets should be retrieved from the FacetSetCatalog.


clearFacets

public void clearFacets()
Removes all Facets


isShowEmptyLinks

public boolean isShowEmptyLinks()

setShowEmptyLinks

public void setShowEmptyLinks(boolean showEmptyLinks)

isSortInstances

public boolean isSortInstances()

setSortInstances

public void setSortInstances(boolean sortInstances)

isShowDerivedLinks

public boolean isShowDerivedLinks()

setShowDerivedLinks

public void setShowDerivedLinks(boolean showDerivedLinks)

isShowFullQualifiedNames

public boolean isShowFullQualifiedNames()

setShowFullQualifiedNames

public void setShowFullQualifiedNames(boolean showFullQualifiedNames)

isShowMultiplicity

public boolean isShowMultiplicity()

setShowMultiplicity

public void setShowMultiplicity(boolean showMultiplicity)

isShowOppositeLinks

public boolean isShowOppositeLinks()

setShowOppositeLinks

public void setShowOppositeLinks(boolean showOppositeLinks)

isShowContainer

public boolean isShowContainer()

setShowContainer

public void setShowContainer(boolean showContainer)

isSortLinks

public boolean isSortLinks()

setSortLinks

public void setSortLinks(boolean value)

setSortLinksByType

public void setSortLinksByType(boolean value)

isSortLinksByType

public boolean isSortLinksByType()

setShowAttributes

public void setShowAttributes(boolean value)

isShowAttributes

public boolean isShowAttributes()

setShowEmptyAttributes

public void setShowEmptyAttributes(boolean value)

isShowEmptyAttributes

public boolean isShowEmptyAttributes()

setShowOrdering

public void setShowOrdering(boolean value)

isShowOrdering

public boolean isShowOrdering()

setShowTypeOfLinks

public void setShowTypeOfLinks(boolean value)

isShowTypeOfLinks

public boolean isShowTypeOfLinks()

setShowElementIDs

public void setShowElementIDs(boolean showElementIDs)

isShowElementIDs

public boolean isShowElementIDs()

setShowURI

public void setShowURI(boolean showURI)

isShowURI

public boolean isShowURI()

setFontSizeDelta

public void setFontSizeDelta(int value)

getFontSizeDelta

public int getFontSizeDelta()

setCustomFont

public void setCustomFont(Font customFont)

getCustomFont

public Font getCustomFont()

setCustomItalicFont

public void setCustomItalicFont(Font customItalicFont)

getCustomItalicFont

public Font getCustomItalicFont()