|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.wpi.prc.tools.builder.ProjectBuilder
public class ProjectBuilder
This class initializes and starts the GUI used by project developers to configure their projects.
Field Summary | |
---|---|
private static ProjectBuilder |
builderGUI
|
static java.lang.String |
CLIENT_CONFIG_FILE_PATH
|
static java.lang.String |
DEFAULT_CONFIG_DIRECTORY
|
private static java.lang.String |
ERROR_ICON_FILE
|
private static int |
ERROR_ICON_FILE_SIZE
|
private static java.lang.String |
ERROR_ICON_PATH
|
private javax.swing.Icon |
errorIcon
|
private static java.lang.String |
ICON_DIRECTORY
|
private static java.lang.String |
INFORMATION_ICON_FILE
|
private static int |
INFORMATION_ICON_FILE_SIZE
|
private static java.lang.String |
INFORMATION_ICON_PATH
|
private javax.swing.Icon |
informationIcon
|
private boolean |
newProject
|
private Project |
project
|
static java.lang.String |
SERVER_CONFIG_FILE_PATH
|
private static java.lang.String |
WARNING_ICON_FILE
|
private static int |
WARNING_ICON_FILE_SIZE
|
private static java.lang.String |
WARNING_ICON_PATH
|
private javax.swing.Icon |
warningIcon
|
Constructor Summary | |
---|---|
ProjectBuilder()
Default constructor. |
Method Summary | |
---|---|
static void |
addWindowCloseListener(java.awt.Window component)
Adds a window close listener for a GUI component that causes the program to exit. |
static void |
centerComponent(javax.swing.JFrame component)
Determines how to center a GUI component on the screen, then displays it. |
javax.swing.Icon |
getErrorIcon()
|
javax.swing.Icon |
getInformationIcon()
Returns the information icon to be used in notification dialogs. |
Project |
getProject()
|
private void |
initializeIcons()
Attempts to read in image files to create icons. |
static ProjectBuilder |
instance()
|
boolean |
isNewProject()
|
static void |
main(java.lang.String[] args)
Main control of the project builder GUI. |
void |
setNewProject(boolean newProject)
Sets whether the user is creating a new project or modifying an existing project. |
void |
setProject(Project project)
|
static void |
setRelativePosition(javax.swing.JFrame child,
javax.swing.JFrame parent)
Centers a child frame relative to its parent frame. |
void |
showErrorDialog(java.awt.Component parentComponent,
java.lang.String message)
Displays a modal error message dialog with the specified message. |
void |
showInformationDialog(java.awt.Component parentComponent,
java.lang.String message)
Displays a modal information message dialog with the specified message. |
void |
showWarningDialog(java.awt.Component parentComponent,
java.lang.String message)
Displays a modal warning message dialog with the specified message. |
static void |
shutdown()
Cleanly shuts down the Builder GUI. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DEFAULT_CONFIG_DIRECTORY
public static final java.lang.String SERVER_CONFIG_FILE_PATH
public static final java.lang.String CLIENT_CONFIG_FILE_PATH
private static final java.lang.String ICON_DIRECTORY
private static final java.lang.String ERROR_ICON_FILE
private static final int ERROR_ICON_FILE_SIZE
private static final java.lang.String WARNING_ICON_FILE
private static final int WARNING_ICON_FILE_SIZE
private static final java.lang.String INFORMATION_ICON_FILE
private static final int INFORMATION_ICON_FILE_SIZE
private static final java.lang.String ERROR_ICON_PATH
private static final java.lang.String WARNING_ICON_PATH
private static final java.lang.String INFORMATION_ICON_PATH
private static ProjectBuilder builderGUI
private Project project
private boolean newProject
private javax.swing.Icon errorIcon
private javax.swing.Icon warningIcon
private javax.swing.Icon informationIcon
Constructor Detail |
---|
public ProjectBuilder()
Method Detail |
---|
private void initializeIcons()
public Project getProject()
public void setProject(Project project)
project
- The project to set.public boolean isNewProject()
public javax.swing.Icon getErrorIcon()
public javax.swing.Icon getInformationIcon()
public void setNewProject(boolean newProject)
newProject
- True if the user is creating a new project, false if modifying an existing project.public static void centerComponent(javax.swing.JFrame component)
component
- The component to center.public static void setRelativePosition(javax.swing.JFrame child, javax.swing.JFrame parent)
child
- The child frame.parent
- The parent frame.public static void addWindowCloseListener(java.awt.Window component)
component
- The component to which to add the listener.public void showErrorDialog(java.awt.Component parentComponent, java.lang.String message)
parentComponent
- The component that created this dialog.message
- The message to display.public void showWarningDialog(java.awt.Component parentComponent, java.lang.String message)
parentComponent
- The component that created this dialog.message
- The message to display.public void showInformationDialog(java.awt.Component parentComponent, java.lang.String message)
parentComponent
- The component that created this dialog.message
- The message to display.public static void shutdown()
public static ProjectBuilder instance()
public static void main(java.lang.String[] args)
args
- Command-line arguments.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |