org.telscenter.pas.common.ui
Class CommonUI

java.lang.Object
  extended by org.telscenter.pas.common.ui.CommonUI

public class CommonUI
extends java.lang.Object


Field Summary
static java.lang.String CREATE_Label
           
static java.lang.String DEFAULT_FILENAME
           
static java.lang.String EDIT_BUTTON
           
static java.lang.String EDIT_LABEL
           
static java.lang.String EDIT_MODE
           
static java.lang.String EDIT_PANEL
           
static java.lang.String fileName
           
static java.lang.String HTML_REGEX
           
static java.lang.String MODE
           
static java.lang.String SAVE_MODE
           
static long serialVersionUID
           
static java.lang.String TEXT_COMP
           
 
Constructor Summary
CommonUI()
           
 
Method Summary
static void addButtonRollover(javax.swing.JButton button, javax.swing.ImageIcon rollOverIcon)
           
static void applyDNDHack(javax.swing.JComponent comp)
           
static java.awt.Point centerDialogOnScreen(java.awt.Rectangle bounds)
           
static javax.swing.border.Border create4PEmptyBorder()
           
static javax.swing.JPanel createEditableTextarea(javax.swing.text.JTextComponent textComponent, java.awt.Dimension dim)
           
static javax.swing.border.Border createEtchedBorder()
           
static javax.swing.JComponent createHTMLTextPanel(java.lang.String text)
           
static java.awt.event.ActionListener createHTMLTidyEditActionlistener()
           
static javax.swing.border.Border createLowerBannerGap()
           
static javax.swing.border.Border createPurpleWhiteBorder()
           
static java.lang.String extractFileName(java.lang.String url)
           
static java.awt.Component getComponentByName(java.awt.Container container, java.lang.String name)
           
static java.util.List getComponentsByName(java.awt.Container container, java.lang.String name, java.util.List<java.awt.Component> cs)
           
static java.lang.String getFileName()
           
static javax.swing.JButton makeButtonTransparent(javax.swing.JButton button)
           
static void makeButtonWithHandCursor(javax.swing.JButton button)
           
static javax.swing.JButton makeEnhancedButton(javax.swing.JButton button)
           
static javax.swing.JButton makeHintbutton(javax.swing.JButton hintButton)
           
static javax.swing.JButton makeLink(javax.swing.JButton button)
           
static void makeMultilineEditable(javax.swing.text.JTextComponent area)
           
static void makeMultilineLabel(javax.swing.text.JTextComponent area)
           
static void modScrollPane(javax.swing.JScrollPane spane)
           
static java.io.File openDialog()
          Opens the native system file choosing dialog
static java.io.File openDialog(java.lang.String fileExtension)
          Opens the native system file choosing dialog
static java.io.File saveDialog()
          Opens the native system save file dialog
static void setFileName(java.lang.String fileName)
           
static javax.swing.JDialog showHintDialog(HintSet hintSet, javax.swing.JFrame frame)
           
static java.lang.String tidyHtml(java.lang.String html)
           
static java.lang.String tidyHtml(java.lang.String html, java.lang.String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MODE

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

SAVE_MODE

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

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values

EDIT_MODE

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

CREATE_Label

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

EDIT_LABEL

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

EDIT_BUTTON

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

TEXT_COMP

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

EDIT_PANEL

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

DEFAULT_FILENAME

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

fileName

public static java.lang.String fileName

HTML_REGEX

public static final java.lang.String HTML_REGEX
See Also:
Constant Field Values
Constructor Detail

CommonUI

public CommonUI()
Method Detail

tidyHtml

public static java.lang.String tidyHtml(java.lang.String html)

createHTMLTextPanel

public static javax.swing.JComponent createHTMLTextPanel(java.lang.String text)
Parameters:
formPanel -
textI -
Returns:

createHTMLTidyEditActionlistener

public static java.awt.event.ActionListener createHTMLTidyEditActionlistener()

tidyHtml

public static java.lang.String tidyHtml(java.lang.String html,
                                        java.lang.String name)

getComponentByName

public static java.awt.Component getComponentByName(java.awt.Container container,
                                                    java.lang.String name)

getComponentsByName

public static java.util.List getComponentsByName(java.awt.Container container,
                                                 java.lang.String name,
                                                 java.util.List<java.awt.Component> cs)

createEditableTextarea

public static javax.swing.JPanel createEditableTextarea(javax.swing.text.JTextComponent textComponent,
                                                        java.awt.Dimension dim)

centerDialogOnScreen

public static java.awt.Point centerDialogOnScreen(java.awt.Rectangle bounds)

createEtchedBorder

public static javax.swing.border.Border createEtchedBorder()

createLowerBannerGap

public static javax.swing.border.Border createLowerBannerGap()

makeMultilineEditable

public static void makeMultilineEditable(javax.swing.text.JTextComponent area)

makeMultilineLabel

public static void makeMultilineLabel(javax.swing.text.JTextComponent area)

createPurpleWhiteBorder

public static javax.swing.border.Border createPurpleWhiteBorder()

create4PEmptyBorder

public static javax.swing.border.Border create4PEmptyBorder()

makeLink

public static javax.swing.JButton makeLink(javax.swing.JButton button)

makeEnhancedButton

public static javax.swing.JButton makeEnhancedButton(javax.swing.JButton button)

makeButtonWithHandCursor

public static void makeButtonWithHandCursor(javax.swing.JButton button)

applyDNDHack

public static void applyDNDHack(javax.swing.JComponent comp)

makeHintbutton

public static javax.swing.JButton makeHintbutton(javax.swing.JButton hintButton)
Parameters:
hintButton -

makeButtonTransparent

public static javax.swing.JButton makeButtonTransparent(javax.swing.JButton button)

addButtonRollover

public static void addButtonRollover(javax.swing.JButton button,
                                     javax.swing.ImageIcon rollOverIcon)

showHintDialog

public static javax.swing.JDialog showHintDialog(HintSet hintSet,
                                                 javax.swing.JFrame frame)

modScrollPane

public static void modScrollPane(javax.swing.JScrollPane spane)

openDialog

public static java.io.File openDialog()
Opens the native system file choosing dialog

Returns:
the file the user has chosen

openDialog

public static java.io.File openDialog(java.lang.String fileExtension)
Opens the native system file choosing dialog

Parameters:
the - extension file type we are allowing the user to choose
Returns:
the file the user has chosen

saveDialog

public static java.io.File saveDialog()
Opens the native system save file dialog

Returns:
the file to be saved

getFileName

public static java.lang.String getFileName()
Returns:
the fileName

setFileName

public static void setFileName(java.lang.String fileName)
Parameters:
fileName - the fileName to set

extractFileName

public static java.lang.String extractFileName(java.lang.String url)
Parameters:
url - a path to a file
Returns:
the filename and extension without the directory


Copyright © 2004-2008 TELS Center. All Rights Reserved.