Class FlagProperty


  • public class FlagProperty
    extends java.lang.Object
    Flags a property for update in a structured viewer. The updates are flagged to be processed asynchronously if called using the flag methods, the refresh method can be used sparingly and supports switching to the SWT thread, as it requires more processing.
    Author:
    Christopher Mindus
    • Constructor Summary

      Constructors 
      ConstructorDescription
      FlagProperty() 
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static voidflag​(org.eclipse.jface.viewers.StructuredViewer viewer, DesignerProp dp)
      Flags the property for update in the viewer asynchronously.
      static voidflag​(org.eclipse.jface.viewers.StructuredViewer viewer, GProp<?> property)
      Flags the property for update in the viewer asynchronously.
      static voidflag​(org.eclipse.jface.viewers.StructuredViewer viewer, java.util.Set<java.lang.Object> list)
      Flags the properties for update in the viewer asynchronously.
      static voidrefresh​(org.eclipse.jface.viewers.StructuredViewer viewer, java.lang.Object element)
      Refreshes a value if possible.
      static voidrefreshAllViewers()
      Refreshes all viewers.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FlagProperty

        public FlagProperty()
    • Method Detail

      • flag

        public static void flag​(org.eclipse.jface.viewers.StructuredViewer viewer,
                                DesignerProp dp)
        Flags the property for update in the viewer asynchronously.
        Parameters:
        viewer - The viewer.
        dp - The property.
      • flag

        public static void flag​(org.eclipse.jface.viewers.StructuredViewer viewer,
                                java.util.Set<java.lang.Object> list)
        Flags the properties for update in the viewer asynchronously.
        Parameters:
        viewer - The viewer.
        list - The list of properties.
      • flag

        public static void flag​(org.eclipse.jface.viewers.StructuredViewer viewer,
                                GProp<?> property)
        Flags the property for update in the viewer asynchronously.
        Parameters:
        viewer - The viewer.
        property - The property.
      • refresh

        public static void refresh​(org.eclipse.jface.viewers.StructuredViewer viewer,
                                   java.lang.Object element)
        Refreshes a value if possible. It is recommended to use the "flag" method as it always triggers an async update of the viewer element from any thread and groups multiple updates together.
      • refreshAllViewers

        public static void refreshAllViewers()
        Refreshes all viewers.