Class CellSetConfig
- java.lang.Object
-
- ruscz.game.gameOfProd.LevelEditor.CellSetConfig
-
public class CellSetConfig extends java.lang.ObjectThis class displays cellMap configuration
-
-
Field Summary
Fields Modifier and Type Field Description private LevelEditoreditorprivate javax.swing.JScrollPanescrollInfoprivate javax.swing.JLayeredPaneview
-
Constructor Summary
Constructors Constructor Description CellSetConfig(LevelEditor editor, javax.swing.JScrollPane scrollInfo)
-
Method Summary
Modifier and Type Method Description voiddisplayCellSetConfig()Displays fields with values from cellMapprivate javax.swing.JLabeldividerLabel(int offset)Creates new label that is used as a divider between different blocks of fieldsprivate javax.swing.JLabeliconLabel(java.lang.String name, int offset)Creates new JLabel with image of the selected tileprivate javax.swing.JButtonimportButton(javax.swing.JLabel iconLabel, javax.swing.JTextField tileNum, int offset)Creates new button for importing value from Tileset Overviewprivate javax.swing.JLabelnameLabel(java.lang.String name, int offset)Creates new JLabel with name of cell typeprivate javax.swing.JTextFieldnumField(java.lang.String name, int offset)Creates text field for value inputprivate javax.swing.JButtonselectButton(javax.swing.JButton importButton, int offset)Creates new button for selecting a tile in Tileset Overviewprivate javax.swing.JLabelvalueLabel(int offset)Creates label with 'Inner Value:' text
-
-
-
Field Detail
-
editor
private final LevelEditor editor
-
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 labeloffset- 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 labeloffset- 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 fieldoffset- 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 changedtileNum- is text field to be changedoffset- 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 buttonoffset- 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
-
-