|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectData
public class Data
This class handles all the User Interface and interactions with the user in the Set Editor tabs. Its purpose is to support the creation and modification of TileSets.
Field Summary | |
---|---|
(package private) javax.swing.JButton |
addButton
Button used to add more tiles to the TileSet |
(package private) javax.swing.JCheckBox |
arrangementCommentCheck
Checkbox to require arrangement comments when doing a complete arrangement save |
(package private) javax.swing.JCheckBox |
blankCheck
Checkbox to allow blank tiles (and enable the blank tile options) |
(package private) javax.swing.JCheckBox |
blankDescCheck
Checkbox to require a description on all blank tiles |
(package private) javax.swing.JComboBox |
blankList
ComboBox containing the list of tiles with the highlighted tile to be used as the blank tile |
(package private) javax.swing.DefaultComboBoxModel |
blankListModel
ComboBox Model for the blank tile combo box |
(package private) javax.swing.JCheckBox |
blankNameCheck
Checkbox to require a name on all blank tiles |
(package private) javax.swing.JTextField |
blankNumField
Textfield for number of blank tiles allowed |
(package private) javax.swing.SpinnerModel |
blankNumModel
Spinner Model for number of blank tiles allowed |
(package private) javax.swing.JSpinner |
blankNumSpinner
Spinner for number of blank tiles allowed |
(package private) javax.swing.JCheckBox |
blankUnlimitedCheck
Checkbox to allow unlimited blank tiles |
(package private) java.awt.Font |
buttonFont
Font used for some buttons |
(package private) javax.swing.JButton |
closeViewButton
The close button on the view tile image dialog |
(package private) java.io.File |
curDirectory
Keeps track of the last directory the user used to get tile images from |
(package private) javax.swing.JTextArea |
descText
Description of Instructions of the TileSet |
(package private) javax.swing.JPanel |
dialogPanel
Panel containing the Image of the tile the user wishes to view |
(package private) javax.swing.JTextField |
gridTilesHighField
Text Field for the Grid's number of tiles high |
(package private) javax.swing.SpinnerModel |
gridTilesHighModel
Spinner Model for the Grid's number of tiles high |
(package private) javax.swing.JSpinner |
gridTilesHighSpinner
Spinner for the Grid's number of tiles high |
(package private) javax.swing.JTextField |
gridTilesWideField
Text Field for the Grid's number of tiles wide |
(package private) javax.swing.SpinnerModel |
gridTilesWideModel
Spinner Model for the Grid's number of tiles wide |
(package private) javax.swing.JSpinner |
gridTilesWideSpinner
Spinner for the Grid's number of tiles wide |
(package private) javax.swing.JButton |
helpBlankButton
Help button for setting the blank tile |
(package private) javax.swing.JButton |
helpGridSizeButton
Help button for setting the Grid size |
(package private) javax.swing.JButton |
helpTileSizeButton
Help button for setting the Tile size |
(package private) java.util.ArrayList |
iconListData
List of Icons representing the tiles added to the TileSet |
(package private) javax.swing.JDialog |
imageDialog
Dialog containing the panel with the tile image the user wishes to view |
(package private) java.awt.Font |
labelHeaderFont
Font used for some label headers |
(package private) java.awt.Font |
labelRegularFont
Font used for most regular labels |
(package private) int |
maxGridSize
Maximum size of the Grid |
(package private) int |
maxTileSize
Maximum allowed size of tiles in pixels |
(package private) int |
minGridSize
Minimum size of the Grid |
(package private) int |
minTileSize
Minimum allowed size of tiles in pixels |
(package private) javax.swing.JTextField |
missingNumField
Textfield for the number of randomly removed tiles |
(package private) javax.swing.SpinnerModel |
missingNumModel
Spinner Model for the number of randomly removed tiles |
(package private) javax.swing.JSpinner |
missingNumSpinner
Spinner for the number of randomly removed tiles |
(package private) javax.swing.JCheckBox |
missingTilesCheck
Checkbox to enable randomly removed tiles when the set loads |
(package private) javax.swing.JTextField |
nameText
Name of the TileSet |
(package private) CLIPFrame |
parentFrame
The frame that the application runs in |
(package private) javax.swing.JButton |
removeButton
Button used to remove the selected tile from the TileSet |
(package private) javax.swing.JMenuItem |
removeSelectedTileMenuItem
Tile list context menu option of remove the selected tile from the tile list |
(package private) javax.swing.JScrollPane |
rulePane
The Scroll Pane for the first tab of the Set Editor |
(package private) javax.swing.JButton |
selectBlankTileButton
Button to set the seleted tile as the blank tile |
(package private) javax.swing.JMenuItem |
selectBlankTileMenuItem
Tile list context menu option to set the selected tile as the blank tile |
(package private) javax.swing.ImageIcon |
selectedIcon
Image of the selected tile attached to the view dialog when the user views a tile |
(package private) javax.swing.JCheckBox |
sessionPrintCheck
Checkbox to allow printing from the TileSet |
(package private) Rules |
setRules
The Rules object containing the information in the Set Editor dialog |
(package private) java.awt.Font |
textFont
Font used for the tile listing |
(package private) javax.swing.JTextField |
tileHeightField
Textfield for the Tile's pixel height |
(package private) javax.swing.SpinnerModel |
tileHeightModel
Spinner Model for the Tile's pixel height |
(package private) javax.swing.JSpinner |
tileHeightSpinner
Spinner for the Tile's pixel height |
(package private) javax.swing.JList |
tileList
The list of tiles added to the TileSet |
(package private) javax.swing.DefaultListModel |
tileListModel
List Model for the tile listing |
(package private) int |
tileListNum
Number of tiles that have been added to the TileSet |
(package private) javax.swing.JPopupMenu |
tileListPopup
Popup context menu for the tile list |
(package private) javax.swing.JTextField |
tileWidthField
Textfield for the Tile's pixel width |
(package private) javax.swing.SpinnerModel |
tileWidthModel
Spinner Model for the Tile's pixel width |
(package private) javax.swing.JSpinner |
tileWidthSpinner
Spinner for the Tile's pixel width |
(package private) javax.swing.JCheckBox |
unusedCheck
Checkbox to allow unused tiles (and enable the unused tile options) |
(package private) javax.swing.JCheckBox |
unusedDescCheck
Checkbox to require an explanation on all unused tiles |
(package private) javax.swing.JTextField |
unusedNumField
Textfield for number of unused tiles allowed |
(package private) javax.swing.SpinnerModel |
unusedNumModel
Spinner Model for the number of unused tiles allowed |
(package private) javax.swing.JSpinner |
unusedNumSpinner
Spinner for number of unused tiles allowed |
(package private) javax.swing.JCheckBox |
unusedUnlimitedCheck
Checkbox to allow unlimited unused tiles |
(package private) javax.swing.JMenuItem |
viewSelectedTileMenuItem
Tile list context menu option to view the selected tile |
(package private) javax.swing.JButton |
viewTileButton
Button used to view the image of the selected tile |
Constructor Summary | |
---|---|
Data(CLIPFrame parent)
Constructor sets default values, creates a new Rules object, and sets up the fonts. |
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent ev)
Action listener that recieves events when the user interacts with various controls in the three tabs of the Set Editor. |
private void |
AddTilesToList()
Opens up a file dialog and allows the user to add image files to the list of tiles in the set. |
void |
changedUpdate(javax.swing.event.DocumentEvent ev)
(Not Used) Extends the document listener method and used to set the apply button to enabled. |
(package private) javax.swing.JPanel |
createArrangementOptionsPanel()
Creates the second tab (Advanced Options) of the Set Editor. |
(package private) javax.swing.JScrollPane |
createRuleEditor()
Creates the first tab (Basic Options) of the Set Editor. |
(package private) javax.swing.JPanel |
createTileEditor()
Creates the third tab (Tile Editor) of the Set Editor. |
boolean |
duplicateNameCheck(java.lang.String name)
Returns true if any tiles in the tile list
have the same name as the passed in String. |
void |
insertUpdate(javax.swing.event.DocumentEvent ev)
(Not Used) Extends the document listener method and used to set the apply button to enabled. |
void |
mouseClicked(java.awt.event.MouseEvent ev)
Unused mouseClicked Event for the Data Module |
void |
mouseEntered(java.awt.event.MouseEvent ev)
Unused mouseEntered Event for the Data Module |
void |
mouseExited(java.awt.event.MouseEvent ev)
Unused mouseExited Event for the Data Module |
void |
mousePressed(java.awt.event.MouseEvent ev)
Mouse Event that handles viewing tile images if they were double clicked in the tile list. |
void |
mouseReleased(java.awt.event.MouseEvent ev)
Mouse Event that triggers the popup menu on the Windows platform (and possibly others). |
private void |
RemoveSelectedTilesFromList()
Removes the selected tile(s) from the tile list in the Set Editor Tile Tab. |
void |
removeUpdate(javax.swing.event.DocumentEvent ev)
(Not Used) Extends the document listener method and used to set the apply button to enabled. |
void |
resetValues()
Resets all the fields in the three tabs of the Set Editor to thier default values. |
void |
setValues()
Saves all the values in the Set Editor tabs to the current Rules object in this module. |
void |
stateChanged(javax.swing.event.ChangeEvent ev)
Handles stateChanged events for many controls in the three Set Editor tabs. |
private void |
ViewSelectedTile()
Brings up a dialog with an image of the selected tile in the Set Editor Tile Tab's tile list. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
CLIPFrame parentFrame
Rules setRules
java.awt.Font buttonFont
java.awt.Font labelHeaderFont
java.awt.Font textFont
java.awt.Font labelRegularFont
javax.swing.JScrollPane rulePane
javax.swing.JTextField nameText
javax.swing.JTextArea descText
final int minGridSize
final int maxGridSize
javax.swing.SpinnerModel gridTilesWideModel
javax.swing.SpinnerModel gridTilesHighModel
javax.swing.JTextField gridTilesWideField
javax.swing.JTextField gridTilesHighField
javax.swing.JSpinner gridTilesWideSpinner
javax.swing.JSpinner gridTilesHighSpinner
javax.swing.JButton helpGridSizeButton
final int minTileSize
final int maxTileSize
javax.swing.SpinnerModel tileWidthModel
javax.swing.SpinnerModel tileHeightModel
javax.swing.JTextField tileWidthField
javax.swing.JTextField tileHeightField
javax.swing.JSpinner tileWidthSpinner
javax.swing.JSpinner tileHeightSpinner
javax.swing.JButton helpTileSizeButton
javax.swing.SpinnerModel blankNumModel
javax.swing.JTextField blankNumField
javax.swing.JSpinner blankNumSpinner
javax.swing.JCheckBox blankUnlimitedCheck
javax.swing.JCheckBox blankNameCheck
javax.swing.JCheckBox blankDescCheck
javax.swing.JCheckBox blankCheck
javax.swing.SpinnerModel unusedNumModel
javax.swing.JTextField unusedNumField
javax.swing.JSpinner unusedNumSpinner
javax.swing.JCheckBox unusedUnlimitedCheck
javax.swing.JCheckBox unusedDescCheck
javax.swing.JCheckBox unusedCheck
javax.swing.SpinnerModel missingNumModel
javax.swing.JTextField missingNumField
javax.swing.JSpinner missingNumSpinner
javax.swing.JCheckBox missingTilesCheck
javax.swing.JCheckBox arrangementCommentCheck
javax.swing.JCheckBox sessionPrintCheck
javax.swing.JButton selectBlankTileButton
javax.swing.JPopupMenu tileListPopup
javax.swing.JMenuItem selectBlankTileMenuItem
javax.swing.JMenuItem viewSelectedTileMenuItem
javax.swing.JMenuItem removeSelectedTileMenuItem
javax.swing.DefaultListModel tileListModel
javax.swing.JList tileList
javax.swing.ImageIcon selectedIcon
java.util.ArrayList iconListData
javax.swing.JButton addButton
javax.swing.JButton removeButton
javax.swing.JButton viewTileButton
int tileListNum
javax.swing.JComboBox blankList
javax.swing.DefaultComboBoxModel blankListModel
javax.swing.JButton helpBlankButton
javax.swing.JPanel dialogPanel
javax.swing.JDialog imageDialog
javax.swing.JButton closeViewButton
java.io.File curDirectory
Constructor Detail |
---|
public Data(CLIPFrame parent)
Rules
object, and sets up the fonts.
parent
- The frame the application runs inMethod Detail |
---|
public void resetValues()
public void setValues()
Rules
object in this module.
public boolean duplicateNameCheck(java.lang.String name)
true
if any tiles in the tile list
have the same name as the passed in String.
name
- Name to check for duplicates of in the tile list
true
if the name was found in the tile listtileListModel
private void AddTilesToList()
private void RemoveSelectedTilesFromList()
private void ViewSelectedTile()
public void changedUpdate(javax.swing.event.DocumentEvent ev)
changedUpdate
in interface javax.swing.event.DocumentListener
public void insertUpdate(javax.swing.event.DocumentEvent ev)
insertUpdate
in interface javax.swing.event.DocumentListener
public void removeUpdate(javax.swing.event.DocumentEvent ev)
removeUpdate
in interface javax.swing.event.DocumentListener
public void mouseClicked(java.awt.event.MouseEvent ev)
mouseClicked
in interface java.awt.event.MouseListener
public void mouseEntered(java.awt.event.MouseEvent ev)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent ev)
mouseExited
in interface java.awt.event.MouseListener
public void mousePressed(java.awt.event.MouseEvent ev)
mousePressed
in interface java.awt.event.MouseListener
public void mouseReleased(java.awt.event.MouseEvent ev)
mouseReleased
in interface java.awt.event.MouseListener
public void stateChanged(javax.swing.event.ChangeEvent ev)
stateChanged
in interface javax.swing.event.ChangeListener
ev
- The ChangeEventpublic void actionPerformed(java.awt.event.ActionEvent ev)
actionPerformed
in interface java.awt.event.ActionListener
ev
- The ActionEventjavax.swing.JScrollPane createRuleEditor()
javax.swing.JPanel createArrangementOptionsPanel()
javax.swing.JPanel createTileEditor()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |