SourceJammer 1.3.0 November 20, 2002
Copyright (c) 2001, 2002 Robert MacGrogan

org.sourcejammer.client.gui
Class GuiUtil

java.lang.Object
  |
  +--org.sourcejammer.client.gui.GuiUtil

public class GuiUtil
extends java.lang.Object

Title: SourceJammer v 0.1.0 Description: Copyright: Copyright (c) 2001 Company:


Inner Class Summary
static class GuiUtil.Columns
           
static class GuiUtil.CustomTableModel
           
 
Method Summary
static boolean areTextFilesSelected(ProjectTreeNode project, java.lang.String[] selectedFileNames)
          Determines if any of the selected files in project are text files.
static boolean createDirectoryIfRequested(java.io.File dir)
           
static javax.swing.tree.DefaultTreeModel createTreeModel(Project root)
           
static java.lang.String[] displayInputBox(java.lang.String[] inputLabels, java.lang.String[] defaultValues, java.lang.String title, boolean modal, java.lang.String okButtonText)
           
static java.lang.String[] displayInputBox(java.lang.String[] inputLabels, java.lang.String title, boolean modal, java.lang.String okButtonText)
           
static void displayWarningMessage(java.lang.String s)
          Display a message.
static VersionListTableModel getBaseVersionListTableModel()
           
static java.awt.Image getFileIcon(NodeInfo nd)
           
static DefaultSortTableModel getFileTableModel(NodeIterator files)
           
static void refreshTreeNodeContents(ProjectTreeNode node)
           
static java.io.File selectFile(boolean bShowFiles, java.lang.String title, java.lang.String affirmText, java.io.File defaultDir, java.awt.Dialog parentDialog)
          Display file dialog type specified in config file to select a file/directory.
static java.io.File selectFile(boolean bShowFiles, java.lang.String title, java.lang.String affirmText, java.io.File defaultDir, java.awt.Frame parentFrame)
          Display file dialog type specified in config file to select a file/directory.
static java.awt.GridBagConstraints setConstraints(java.awt.GridBagConstraints constraints, int x, int y, int width, int height, int padx, int pady, int fill, int anchor)
           
static void setNewTableModel(javax.swing.table.TableModel model)
           
static void setTableColumnToolTip(javax.swing.JTable table, javax.swing.table.TableColumn col, java.lang.String colName, java.lang.String toolTip)
           
static void setTablePreferredSizes()
           
static NodeIterator sortNodeIterator(NodeIterator iter)
          Return a new NodeIterator with some contents as iter passed in, but sorted by NodeName.
static NodeIterator sortNodeIterator(NodeIterator iter, boolean invert)
          Return a new NodeIterator with some contents as iter passed in, but sorted by NodeName.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

selectFile

public static java.io.File selectFile(boolean bShowFiles,
                                      java.lang.String title,
                                      java.lang.String affirmText,
                                      java.io.File defaultDir,
                                      java.awt.Frame parentFrame)
Display file dialog type specified in config file to select a file/directory.

selectFile

public static java.io.File selectFile(boolean bShowFiles,
                                      java.lang.String title,
                                      java.lang.String affirmText,
                                      java.io.File defaultDir,
                                      java.awt.Dialog parentDialog)
Display file dialog type specified in config file to select a file/directory.

setTablePreferredSizes

public static void setTablePreferredSizes()

getFileTableModel

public static DefaultSortTableModel getFileTableModel(NodeIterator files)

getFileIcon

public static java.awt.Image getFileIcon(NodeInfo nd)

refreshTreeNodeContents

public static void refreshTreeNodeContents(ProjectTreeNode node)
                                    throws GUICommandException,
                                           SourceJammerConnectionException

setNewTableModel

public static void setNewTableModel(javax.swing.table.TableModel model)

displayInputBox

public static java.lang.String[] displayInputBox(java.lang.String[] inputLabels,
                                                 java.lang.String title,
                                                 boolean modal,
                                                 java.lang.String okButtonText)

displayInputBox

public static java.lang.String[] displayInputBox(java.lang.String[] inputLabels,
                                                 java.lang.String[] defaultValues,
                                                 java.lang.String title,
                                                 boolean modal,
                                                 java.lang.String okButtonText)

getBaseVersionListTableModel

public static VersionListTableModel getBaseVersionListTableModel()

setTableColumnToolTip

public static void setTableColumnToolTip(javax.swing.JTable table,
                                         javax.swing.table.TableColumn col,
                                         java.lang.String colName,
                                         java.lang.String toolTip)

createTreeModel

public static javax.swing.tree.DefaultTreeModel createTreeModel(Project root)

displayWarningMessage

public static void displayWarningMessage(java.lang.String s)
Display a message.

setConstraints

public static java.awt.GridBagConstraints setConstraints(java.awt.GridBagConstraints constraints,
                                                         int x,
                                                         int y,
                                                         int width,
                                                         int height,
                                                         int padx,
                                                         int pady,
                                                         int fill,
                                                         int anchor)

sortNodeIterator

public static NodeIterator sortNodeIterator(NodeIterator iter)
Return a new NodeIterator with some contents as iter passed in, but sorted by NodeName.

sortNodeIterator

public static NodeIterator sortNodeIterator(NodeIterator iter,
                                            boolean invert)
Return a new NodeIterator with some contents as iter passed in, but sorted by NodeName.

areTextFilesSelected

public static boolean areTextFilesSelected(ProjectTreeNode project,
                                           java.lang.String[] selectedFileNames)
                                    throws NodeDoesNotExistException
Determines if any of the selected files in project are text files.
Parameters:
project - -- the currently selected ProjectTreeNode.
selectedFileNames - -- a String array of the file names of all of the files selected in project.
Returns:
true if at least one of the selected files is a Text file.

createDirectoryIfRequested

public static boolean createDirectoryIfRequested(java.io.File dir)
                                          throws java.io.IOException

SourceJammer 1.3.0 November 20, 2002
Copyright (c) 2001, 2002 Robert MacGrogan