Class SourceEditor.IconPathTableModel

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.List<java.lang.String> data  
      private javax.swing.DefaultListSelectionModel selectionModel  
      • Fields inherited from class javax.swing.table.AbstractTableModel

        listenerList
    • Constructor Summary

      Constructors 
      Constructor Description
      IconPathTableModel​(javax.swing.DefaultListSelectionModel selectionModel)
      Constructs a new IconPathTableModel.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addPath​(java.lang.String path)
      Adds an icon path.
      int getColumnCount()  
      java.util.List<java.lang.String> getIconPaths()
      Returns the icon paths.
      int getRowCount()  
      java.lang.Object getValueAt​(int rowIndex, int columnIndex)  
      boolean isCellEditable​(int rowIndex, int columnIndex)  
      void removeSelected()
      Removes the selected path.
      void setIconPaths​(java.util.Collection<java.lang.String> paths)
      Sets the icons paths.
      void setValueAt​(java.lang.Object aValue, int rowIndex, int columnIndex)  
      protected void sort()
      Sorts paths lexicographically.
      void updatePath​(int pos, java.lang.String path)
      Updates icon path at given index.
      • Methods inherited from class javax.swing.table.AbstractTableModel

        addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getColumnName, getListeners, getTableModelListeners, removeTableModelListener
      • Methods inherited from class java.lang.Object

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

      • data

        private final java.util.List<java.lang.String> data
      • selectionModel

        private final javax.swing.DefaultListSelectionModel selectionModel
    • Constructor Detail

      • IconPathTableModel

        public IconPathTableModel​(javax.swing.DefaultListSelectionModel selectionModel)
        Constructs a new IconPathTableModel.
        Parameters:
        selectionModel - selection model
    • Method Detail

      • getValueAt

        public java.lang.Object getValueAt​(int rowIndex,
                                           int columnIndex)
      • isCellEditable

        public boolean isCellEditable​(int rowIndex,
                                      int columnIndex)
        Specified by:
        isCellEditable in interface javax.swing.table.TableModel
        Overrides:
        isCellEditable in class javax.swing.table.AbstractTableModel
      • setValueAt

        public void setValueAt​(java.lang.Object aValue,
                               int rowIndex,
                               int columnIndex)
        Specified by:
        setValueAt in interface javax.swing.table.TableModel
        Overrides:
        setValueAt in class javax.swing.table.AbstractTableModel
      • setIconPaths

        public void setIconPaths​(java.util.Collection<java.lang.String> paths)
        Sets the icons paths.
        Parameters:
        paths - icons paths
      • addPath

        public void addPath​(java.lang.String path)
        Adds an icon path.
        Parameters:
        path - icon path to add
      • updatePath

        public void updatePath​(int pos,
                               java.lang.String path)
        Updates icon path at given index.
        Parameters:
        pos - position
        path - new path
      • removeSelected

        public void removeSelected()
        Removes the selected path.
      • sort

        protected void sort()
        Sorts paths lexicographically.
      • getIconPaths

        public java.util.List<java.lang.String> getIconPaths()
        Returns the icon paths.
        Returns:
        the icon paths