org.sourcejammer.client.gui
Class GuiUtil

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

public class GuiUtil
extends java.lang.Object

Title: $FileName: GuiUtil.java$

Version:
$VerNum: 12$
Author:
$AuthorName: Rob MacGrogan$

$Description: $
$KeyWordsOff: $

Nested Class Summary
static class GuiUtil.Columns
           
static class GuiUtil.CustomTableModel
           
 
Field Summary
private static int BINARY
           
private static int CHECKED_OUT
           
private static FileDialogWrapper fileDialog
           
private static int LABEL
           
static org.sourcejammer.util.NameValue nv_GET_LATEST
           
static org.sourcejammer.util.NameValue nv_NO_SPECIAL_ACTION
           
static org.sourcejammer.util.NameValue nv_REMOVE_LOCAL
           
static org.sourcejammer.util.NameValue nv_SET_READ_ONLY
           
private static java.lang.String PASSWORD_LABEL
           
private static int SHARED
           
static java.lang.String SKIN_LF_THEMES_DIR
           
private static int TEXT
           
 
Constructor Summary
private GuiUtil()
           
 
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(org.sourcejammer.project.view.Project root)
           
static VersionListTableModel getBaseVersionListTableModel()
           
static java.awt.Image getFileIcon(org.sourcejammer.project.view.NodeInfo nd)
           
static DefaultSortTableModel getFileTableModel(org.sourcejammer.project.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 org.sourcejammer.project.NodeIterator sortNodeIterator(org.sourcejammer.project.NodeIterator iter)
          Return a new NodeIterator with some contents as iter passed in, but sorted by NodeName.
static org.sourcejammer.project.NodeIterator sortNodeIterator(org.sourcejammer.project.NodeIterator iter, boolean invert)
          Return a new NodeIterator with some contents as iter passed in, but sorted by NodeName.
static javax.swing.JPanel topDownLabelComponent(java.lang.String label, java.awt.Component component)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SKIN_LF_THEMES_DIR

public static final java.lang.String SKIN_LF_THEMES_DIR
See Also:
Constant Field Values

nv_NO_SPECIAL_ACTION

public static final org.sourcejammer.util.NameValue nv_NO_SPECIAL_ACTION

nv_SET_READ_ONLY

public static final org.sourcejammer.util.NameValue nv_SET_READ_ONLY

nv_REMOVE_LOCAL

public static final org.sourcejammer.util.NameValue nv_REMOVE_LOCAL

nv_GET_LATEST

public static final org.sourcejammer.util.NameValue nv_GET_LATEST

fileDialog

private static FileDialogWrapper fileDialog

PASSWORD_LABEL

private static final java.lang.String PASSWORD_LABEL

BINARY

private static final int BINARY
See Also:
Constant Field Values

TEXT

private static final int TEXT
See Also:
Constant Field Values

LABEL

private static final int LABEL
See Also:
Constant Field Values

CHECKED_OUT

private static final int CHECKED_OUT
See Also:
Constant Field Values

SHARED

private static final int SHARED
See Also:
Constant Field Values
Constructor Detail

GuiUtil

private GuiUtil()
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(org.sourcejammer.project.NodeIterator files)

getFileIcon

public static java.awt.Image getFileIcon(org.sourcejammer.project.view.NodeInfo nd)

refreshTreeNodeContents

public static void refreshTreeNodeContents(ProjectTreeNode node)
                                    throws GUICommandException,
                                           org.sourcejammer.util.SourceJammerConnectionException
GUICommandException
org.sourcejammer.util.SourceJammerConnectionException

setNewTableModel

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

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(org.sourcejammer.project.view.Project root)

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 org.sourcejammer.project.NodeIterator sortNodeIterator(org.sourcejammer.project.NodeIterator iter)
Return a new NodeIterator with some contents as iter passed in, but sorted by NodeName.


sortNodeIterator

public static org.sourcejammer.project.NodeIterator sortNodeIterator(org.sourcejammer.project.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 org.sourcejammer.project.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.
org.sourcejammer.project.NodeDoesNotExistException

createDirectoryIfRequested

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

topDownLabelComponent

public static javax.swing.JPanel topDownLabelComponent(java.lang.String label,
                                                       java.awt.Component component)


Copyright © 2003 Soucejammer project.