Class CellSetConfig


  • public class CellSetConfig
    extends java.lang.Object
    This class displays cellMap configuration
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private LevelEditor editor  
      private javax.swing.JScrollPane scrollInfo  
      private javax.swing.JLayeredPane view  
    • Constructor Summary

      Constructors 
      Constructor Description
      CellSetConfig​(LevelEditor editor, javax.swing.JScrollPane scrollInfo)  
    • Method Summary

      Modifier and Type Method Description
      void displayCellSetConfig()
      Displays fields with values from cellMap
      private javax.swing.JLabel dividerLabel​(int offset)
      Creates new label that is used as a divider between different blocks of fields
      private javax.swing.JLabel iconLabel​(java.lang.String name, int offset)
      Creates new JLabel with image of the selected tile
      private javax.swing.JButton importButton​(javax.swing.JLabel iconLabel, javax.swing.JTextField tileNum, int offset)
      Creates new button for importing value from Tileset Overview
      private javax.swing.JLabel nameLabel​(java.lang.String name, int offset)
      Creates new JLabel with name of cell type
      private javax.swing.JTextField numField​(java.lang.String name, int offset)
      Creates text field for value input
      private javax.swing.JButton selectButton​(javax.swing.JButton importButton, int offset)
      Creates new button for selecting a tile in Tileset Overview
      private javax.swing.JLabel valueLabel​(int offset)
      Creates label with 'Inner Value:' text
      • Methods inherited from class java.lang.Object

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

      • view

        private final javax.swing.JLayeredPane view
      • scrollInfo

        private javax.swing.JScrollPane scrollInfo
    • Constructor Detail

      • CellSetConfig

        public CellSetConfig​(LevelEditor editor,
                             javax.swing.JScrollPane scrollInfo)
    • Method Detail

      • displayCellSetConfig

        public void displayCellSetConfig()
        Displays fields with values from cellMap
      • nameLabel

        private javax.swing.JLabel nameLabel​(java.lang.String name,
                                             int offset)
        Creates new JLabel with name of cell type
        Parameters:
        name - is name of label
        offset - is offset of label
        Returns:
        new JLabel
      • iconLabel

        private javax.swing.JLabel iconLabel​(java.lang.String name,
                                             int offset)
        Creates new JLabel with image of the selected tile
        Parameters:
        name - is name of label
        offset - is offset of label
        Returns:
        new JLabel
      • valueLabel

        private javax.swing.JLabel valueLabel​(int offset)
        Creates label with 'Inner Value:' text
        Parameters:
        offset - is offset of label
        Returns:
        new JLabel
      • numField

        private javax.swing.JTextField numField​(java.lang.String name,
                                                int offset)
        Creates text field for value input
        Parameters:
        name - is name of field
        offset - is offset of field
        Returns:
        new JTextField
      • importButton

        private javax.swing.JButton importButton​(javax.swing.JLabel iconLabel,
                                                 javax.swing.JTextField tileNum,
                                                 int offset)
        Creates new button for importing value from Tileset Overview
        Parameters:
        iconLabel - is label to be changed
        tileNum - is text field to be changed
        offset - is offset of button
        Returns:
        new JButton
      • selectButton

        private javax.swing.JButton selectButton​(javax.swing.JButton importButton,
                                                 int offset)
        Creates new button for selecting a tile in Tileset Overview
        Parameters:
        importButton - is reference for connected import button
        offset - is offset of button
        Returns:
        new JButton
      • dividerLabel

        private javax.swing.JLabel dividerLabel​(int offset)
        Creates new label that is used as a divider between different blocks of fields
        Parameters:
        offset - is offset of label
        Returns:
        new JLabel