Class TableTool

All Implemented Interfaces:
RMArchiver.Archiving, Cloneable

public class TableTool extends Tool
This class provides Swing UI editing for Tables.
  • Field Details

    • PageBreakIcon

      public static Icon PageBreakIcon
    • NoPageBreakIcon

      public static Icon NoPageBreakIcon
    • SortAscIcon

      public static Icon SortAscIcon
    • SortDescIcon

      public static Icon SortDescIcon
  • Constructor Details

    • TableTool

      public TableTool()
  • Method Details

    • getSelectedTable

      public RMTable getSelectedTable()
      Returns the selected table.
    • getSelectedGrouping

      public RMGrouping getSelectedGrouping()
      Returns the selected grouping for this table.
    • getSelectedSort

      public RMSort getSelectedSort()
      Returns the selected sort for this table.
    • getUI

      public RJPanel getUI()
      Returns the Swing UI panel for this tool.
      Overrides:
      getUI in class Tool
    • resetUI

      public void resetUI()
      Updates Swing UI panel from currently selected table
      Overrides:
      resetUI in class Tool
    • respondUI

      public void respondUI(Object anObj)
      Updates currently selected table from Swing UI panel.
      Overrides:
      respondUI in class Tool
    • takeValueFromDrop

      public void takeValueFromDrop(Object anObj, RJAction anAction)
      Handles drag and drop on grouping or sort tables.
    • getShapeClass

      public Class getShapeClass()
      Returns the shape class this tool edits (RMTable).
      Overrides:
      getShapeClass in class Tool
    • getWindowTitle

      public String getWindowTitle()
      Returns the display name for this tool ("Table Inspector").
      Overrides:
      getWindowTitle in class Tool
    • addGroupingKey

      public void addGroupingKey(String aKey)
      Adds a grouping key to the currently selected table.
    • addSortingKey

      public void addSortingKey(String aKey)
      Adds a sorting key to the currently selected table.
    • moveGrouping

      public void moveGrouping(int index1, int index2)
      Moves a grouping from the first given index to the second given index.
    • moveSort

      public void moveSort(int index1, int index2)
      Moves a sort from the first given index to the second given index.
    • addTable

      public static void addTable(RMEditor anEditor, String aKeyPath)
      Adds a new table to the given editor with the given list key.
    • mouseMoved

      public void mouseMoved(RMShape aShape, MouseEvent anEvent)
      MouseMoved implementation to update cursor for resize bars.
      Overrides:
      mouseMoved in class Tool
    • mousePressed

      public void mousePressed(RMShape aShape, MouseEvent anEvent)
      Event handling for table editing.
      Overrides:
      mousePressed in class Tool
    • mouseDragged

      public void mouseDragged(RMShape aShape, MouseEvent anEvent)
      Event handling for splitshape editing.
      Overrides:
      mouseDragged in class Tool
    • mouseReleased

      public void mouseReleased(RMShape aShape, MouseEvent anEvent)
      Event handling for splitshape editing.
      Overrides:
      mouseReleased in class Tool
    • runMenuForShape

      public void runMenuForShape(RMShape aShape, int x, int y)
      Opens a popup menu specific for table row divider under mouse.
    • getHandleCount

      public int getHandleCount(RMShape aShape)
      Overrides shape implementation to declare no handles when the child of a table group.
      Overrides:
      getHandleCount in class Tool