Class ContextEntryHelper

java.lang.Object
org.eclipse.graphiti.tb.ContextEntryHelper

public class ContextEntryHelper extends Object
The Class ContextEntryHelper comprises methods for creating and modifying context button entries.
  • Field Details

    • NAME

      public static final String NAME
  • Constructor Details

    • ContextEntryHelper

      public ContextEntryHelper()
  • Method Details

    • createDefaultUpdateContextButton

      public static IContextButtonEntry createDefaultUpdateContextButton(IFeatureProvider featureProvider, PictogramElement pe)
      Creates an default update context button entry.
      Parameters:
      featureProvider - the feature provider
      pe - the pictogram element
      Returns:
      the created default update context button entry
    • createDefaultRemoveContextButton

      public static IContextButtonEntry createDefaultRemoveContextButton(IFeatureProvider featureProvider, PictogramElement pe)
      Creates an default remove context button entry.
      Parameters:
      featureProvider - the feature provider
      pe - the pictogram element
      Returns:
      the created default remove context button entry
    • createDefaultDeleteContextButton

      public static IContextButtonEntry createDefaultDeleteContextButton(IFeatureProvider featureProvider, PictogramElement pe)
      Creates an default delete context button entry.
      Parameters:
      featureProvider - the feature provider
      pe - the pictogram element
      Returns:
      the created default delete context button entry
    • createCollapseContextButton

      public static IContextButtonEntry createCollapseContextButton(boolean collapse, IFeature customFeature, IContext customContext)
      Creates collapse button entry or expand button entry as indicated by parameter collapse.
      Parameters:
      collapse - creates a collapse button entry when true, otherwise a expand button entry
      customFeature - the custom feature
      customContext - the custom context
      Returns:
      the created collapse button
    • markAsUpdateContextEntry

      public static void markAsUpdateContextEntry(IContextEntry entry)
      Marks the given context entry with update figure.
      Parameters:
      entry - the context entry
    • markAsRemoveContextEntry

      public static void markAsRemoveContextEntry(IContextEntry entry)
      Marks the given context entry with remove figure from diagram.
      Parameters:
      entry - the context entry
    • markAsDeleteContextEntry

      public static void markAsDeleteContextEntry(IContextEntry entry)
      Marks the given context entry with delete from model.
      Parameters:
      entry - the context entry
    • markAsCollapseContextEntry

      public static void markAsCollapseContextEntry(IContextEntry entry, boolean collapse)
      Marks the given context entry with collapse or expand figure.
      Parameters:
      entry - the context entry
      collapse - mark with collapse when true, otherwise with expand