Module org.autogui

Class GuiSwingTableModelCollection.PreferencesForTableColumnOrder

java.lang.Object
org.autogui.swing.table.GuiSwingTableModelCollection.PreferencesForTableColumnOrder
All Implemented Interfaces:
GuiSwingPrefsSupports.Preferences, GuiSwingPrefsSupports.PreferencesByJsonEntry
Enclosing class:
GuiSwingTableModelCollection

public static class GuiSwingTableModelCollection.PreferencesForTableColumnOrder extends Object implements GuiSwingPrefsSupports.PreferencesByJsonEntry
an ordering index of a column
     "$columnOrder": { "modelIndex":m, "viewIndex":v}
 
  • Field Details

    • modelIndex

      protected int modelIndex
    • viewIndex

      protected int viewIndex
  • Constructor Details

    • PreferencesForTableColumnOrder

      public PreferencesForTableColumnOrder()
    • PreferencesForTableColumnOrder

      public PreferencesForTableColumnOrder(int modelIndex, int viewIndex)
  • Method Details

    • getModelIndex

      public int getModelIndex()
      Returns:
      the property value
      Since:
      1.7
    • setModelIndex

      public void setModelIndex(int modelIndex)
      Parameters:
      modelIndex - the new property value
      Since:
      1.7
    • getViewIndex

      public int getViewIndex()
      Returns:
      the property value
      Since:
      1.7
    • setViewIndex

      public void setViewIndex(int viewIndex)
      Parameters:
      viewIndex - the new property value
      Since:
      1.7
    • applyTo

      public boolean applyTo(ObjectTableModelColumns columns)
      Parameters:
      columns - the columns containing the target
      Returns:
      true if successfully moved. while adding columns, the target index might beyond bounds.
    • getKey

      public String getKey()
      Specified by:
      getKey in interface GuiSwingPrefsSupports.PreferencesByJsonEntry
    • toJson

      public Object toJson()
      Specified by:
      toJson in interface GuiSwingPrefsSupports.PreferencesByJsonEntry
    • setJson

      public void setJson(Object json)
      Specified by:
      setJson in interface GuiSwingPrefsSupports.PreferencesByJsonEntry