Java Doc for GUIUtilities.java in  » Swing-Library » jEdit » org » gjt » sp » jedit » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Swing Library » jEdit » org.gjt.sp.jedit 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.gjt.sp.jedit.GUIUtilities

GUIUtilities
public class GUIUtilities (Code)
Various GUI functions.

The most frequently used members of this class are:


author:
   Slava Pestov
version:
   $Id: GUIUtilities.java 11177 2007-12-01 09:50:50Z k_satoda $

Inner Class :static class UnixWorkaround
Inner Class :static class SizeSaver extends ComponentAdapter implements WindowStateListener

Field Summary
public static  IconDIRTY_BUFFER_ICON
    
public static  IconNEW_BUFFER_ICON
    
public static  IconNORMAL_BUFFER_ICON
    
public static  IconREAD_ONLY_BUFFER_ICON
    
public static  IconWINDOW_ICON
    


Method Summary
public static  voidaddSizeSaver(Frame frame, String name)
     Adds a SizeSaver to the specified Frame.
public static  voidaddSizeSaver(Frame frame, Container parent, String name)
     Adds a SizeSaver to the specified Frame.
public static  voidadjustForScreenBounds(Rectangle desired)
     Gives a rectangle the specified bounds, ensuring it is within the screen bounds.
static  voidadvanceSplashProgress()
    
static  voidadvanceSplashProgress(String label)
    
public static  voidcenterOnScreen(Window win)
     Centers the given window on the screen.
public static  intconfirm(Component comp, String name, Object[] args, int buttons, int type)
     Displays a confirm dialog box and returns the button pushed by the user.
public static  JComponentcreateMultilineLabel(String str)
     Creates a component that displays a multiple line message.
public static  voiderror(Component comp, String name, Object[] args)
     Displays an error dialog box. The title of the dialog is fetched from the name.title property.
public static  StringgetColorHexString(Color c)
     Converts a color object to its hex value.
public static  ComponentgetComponentParent(Component comp, Class clazz)
     Finds a parent of the specified component.
public static  ImagegetEditorIcon()
     Returns the default editor window image.
public static  JDialoggetParentDialog(Component c)
     Traverses the given component's parent tree looking for an instance of JDialog, and return it.
public static  ImagegetPluginIcon()
     Returns the default plugin window image.
public static  StringgetShortcutLabel(String action)
     Returns a label string to show users what shortcut are assigned to the action.
public static  StringgetStyleString(SyntaxStyle style)
     Converts a style into it's string representation.
public static  ViewgetView(Component comp)
     Finds the view parent of the specified component.
public static  voidhideSplashScreen()
     Ensures that the splash screen is not visible.
static  voidinit()
    
public static  voidinitContinuousLayout(JSplitPane split)
     Init the continuous layout flag using the jEdit's property appearance.continuousLayout
Parameters:
  split - the split.
public static  Stringinput(Component comp, String name, Object def)
     Displays an input dialog box and returns any text the user entered. The title of the dialog is fetched from the name.title property.
public static  Stringinput(Component comp, String name, Object[] args, Object def)
     Displays an input dialog box and returns any text the user entered. The title of the dialog is fetched from the name.title property.
public static  StringinputProperty(Component comp, String name, String def)
     Displays an input dialog box and returns any text the user entered. The title of the dialog is fetched from the name.title property.
public static  StringinputProperty(Component comp, String name, Object[] args, String def)
     Displays an input dialog box and returns any text the user entered. The title of the dialog is fetched from the name.title property.
public static  booleanisAncestorOf(Component comp1, Component comp2)
     Returns if the first component is an ancestor of the second by traversing up the component hierarchy.
public static  booleanisMiddleButton(int modifiers)
    
public static  booleanisPopupTrigger(MouseEvent evt)
     Returns if the specified event is the popup trigger event.
public static  booleanisRightButton(int modifiers)
    
public static  intlistConfirm(Component comp, String name, String[] args, Object[] listModel)
     Displays a confirm dialog box and returns the button pushed by the user.
public static  intlistConfirm(Component comp, String name, String[] args, Object[] listModel, List selectedItems)
     Displays a confirm dialog box and returns the button pushed by the user.
public static  voidloadGeometry(Window win, Container parent, String name)
     Loads a windows's geometry from the properties.
public static  voidloadGeometry(Window win, String name)
     Loads a windows's geometry from the properties.
public static  IconloadIcon(String iconName)
     Loads an icon.
public static  JMenuloadMenu(String name)
     Creates a menu.
public static  JMenuloadMenu(ActionContext context, String name)
     Creates a menu.
public static  JMenuBarloadMenuBar(String name)
     Creates a menubar.
public static  JMenuBarloadMenuBar(ActionContext context, String name)
     Creates a menubar.
public static  JMenuItemloadMenuItem(String name)
     Creates a menu item.
public static  JMenuItemloadMenuItem(String name, boolean setMnemonic)
     Creates a menu item.
public static  JMenuItemloadMenuItem(ActionContext context, String name, boolean setMnemonic)
     Creates a menu item.
public static  JMenuItemloadMenuItem(EditAction editAction, boolean setMnemonic)
    
public static  JPopupMenuloadPopupMenu(String name)
     Creates a popup menu.
public static  JPopupMenuloadPopupMenu(ActionContext context, String name)
     Creates a popup menu.
public static  SyntaxStyle[]loadStyles(String family, int size)
     Loads the syntax styles from the properties, giving them the specified base font family and size.
public static  SyntaxStyle[]loadStyles(String family, int size, boolean color)
     Loads the syntax styles from the properties, giving them the specified base font family and size.
public static  BoxloadToolBar(String name)
     Creates a toolbar.
public static  BoxloadToolBar(ActionContext context, String name)
     Creates a toolbar.
public static  EnhancedButtonloadToolButton(String name)
     Loads a tool bar button.
public static  EnhancedButtonloadToolButton(ActionContext context, String name)
     Loads a tool bar button.
public static  voidmessage(Component comp, String name, Object[] args)
     Displays a dialog box. The title of the dialog is fetched from the name.title property.
public static  ColorparseColor(String name)
     Converts a color name to a color object.
public static  ColorparseColor(String name, Color defaultColor)
    
public static  SyntaxStyleparseStyle(String str, String family, int size)
     Converts a style string to a style object.
public static  SyntaxStyleparseStyle(String str, String family, int size, boolean color)
     Converts a style string to a style object.
public static  StringprettifyMenuLabel(String label)
     `Prettifies' a menu item label by removing the `$' sign.
public static  voidrequestFocus(Window win, Component comp)
     Focuses on the specified component as soon as the window becomes active.
public static  voidsaveGeometry(Window win, String name)
     Saves a window's geometry to the properties.
public static  voidsaveGeometry(Window win, Container parent, String name)
     Saves a window's geometry to the properties.
public static  voidsetIconPath(String iconPath)
     Sets the path where jEdit looks for icons.
public static  voidshowPopupMenu(JPopupMenu popup, Component comp, int x, int y)
     Shows the specified popup menu, ensuring it is displayed within the bounds of the screen.
public static  voidshowPopupMenu(JPopupMenu popup, Component comp, int x, int y, boolean point)
     Shows the specified popup menu, ensuring it is displayed within the bounds of the screen.
Parameters:
  popup - The popup menu
Parameters:
  comp - The component to show it for
Parameters:
  x - The x co-ordinate
Parameters:
  y - The y co-ordinate
Parameters:
  point - If true, then the popup originates from a single point;otherwise it will originate from the component itself.
static  voidshowSplashScreen()
    
public static  String[]showVFSFileDialog(View view, String path, int type, boolean multipleSelection)
     Displays a VFS file selection dialog box.
Parameters:
  view - The view, should be non-null
Parameters:
  path - The initial directory to display.
public static  String[]showVFSFileDialog(Dialog parent, View view, String path, int type, boolean multipleSelection)
     Displays a VFS file selection dialog box. This version can specify a dialog as the parent instead of the view.
Parameters:
  view - The view, should be non-null
Parameters:
  path - The initial directory to display.
public static  String[]showVFSFileDialog(Frame parent, View view, String path, int type, boolean multipleSelection)
     Displays a VFS file selection dialog box. This version can specify a frame as the parent instead of the view.
Parameters:
  parent - The parent frame
Parameters:
  view - The view, should be non-null
Parameters:
  path - The initial directory to display.

Field Detail
DIRTY_BUFFER_ICON
public static Icon DIRTY_BUFFER_ICON(Code)



NEW_BUFFER_ICON
public static Icon NEW_BUFFER_ICON(Code)



NORMAL_BUFFER_ICON
public static Icon NORMAL_BUFFER_ICON(Code)



READ_ONLY_BUFFER_ICON
public static Icon READ_ONLY_BUFFER_ICON(Code)



WINDOW_ICON
public static Icon WINDOW_ICON(Code)





Method Detail
addSizeSaver
public static void addSizeSaver(Frame frame, String name)(Code)
Adds a SizeSaver to the specified Frame. For non-Frame's use GUIUtilities.saveGeometry(Window,String)
Parameters:
  frame - The Frame for which to save the size
Parameters:
  name - The prefix for the settings
since:
   jEdit 4.3pre6
See Also:   GUIUtilities.saveGeometry(Window,String)



addSizeSaver
public static void addSizeSaver(Frame frame, Container parent, String name)(Code)
Adds a SizeSaver to the specified Frame. For non-Frame's use GUIUtilities.saveGeometry(Window,Container,String)
Parameters:
  frame - The Frame for which to save the size
Parameters:
  parent - The parent to be relative to
Parameters:
  name - The prefix for the settings
since:
   jEdit 4.3pre7
See Also:   GUIUtilities.saveGeometry(Window,Container,String)



adjustForScreenBounds
public static void adjustForScreenBounds(Rectangle desired)(Code)
Gives a rectangle the specified bounds, ensuring it is within the screen bounds.
since:
   jEdit 4.2pre3



advanceSplashProgress
static void advanceSplashProgress()(Code)



advanceSplashProgress
static void advanceSplashProgress(String label)(Code)



centerOnScreen
public static void centerOnScreen(Window win)(Code)
Centers the given window on the screen. This method is needed because JDK 1.3 does not have a JWindow.setLocationRelativeTo() method.
since:
   jEdit 4.2pre3javax.swing.JWindow.setLocationRelativeTo(java.awt.Component)



confirm
public static int confirm(Component comp, String name, Object[] args, int buttons, int type)(Code)
Displays a confirm dialog box and returns the button pushed by the user. The title of the dialog is fetched from the name.title property. The message is fetched from the name.message property.
Parameters:
  comp - The component to display the dialog for
Parameters:
  name - The name of the dialog
Parameters:
  args - Positional parameters to be substituted into themessage text
Parameters:
  buttons - The buttons to display - for example,JOptionPane.YES_NO_CANCEL_OPTION
Parameters:
  type - The dialog type - for example,JOptionPane.WARNING_MESSAGE
since:
   jEdit 3.1pre3



createMultilineLabel
public static JComponent createMultilineLabel(String str)(Code)
Creates a component that displays a multiple line message. This is implemented by assembling a number of JLabels in a JPanel.
Parameters:
  str - The string, with lines delimited by newline(\n) characters.
since:
   jEdit 4.1pre3



error
public static void error(Component comp, String name, Object[] args)(Code)
Displays an error dialog box. The title of the dialog is fetched from the name.title property. The message is fetched from the name.message property. The message is formatted by the property manager with args as positional parameters.
Parameters:
  comp - The component to display the dialog for
Parameters:
  name - The name of the dialog
Parameters:
  args - Positional parameters to be substituted into themessage text



getColorHexString
public static String getColorHexString(Color c)(Code)
Converts a color object to its hex value. The hex value prefixed is with `#', for example `#ff0088'.
Parameters:
  c - The color object



getComponentParent
public static Component getComponentParent(Component comp, Class clazz)(Code)
Finds a parent of the specified component.
Parameters:
  comp - The component
Parameters:
  clazz - Looks for a parent with this class (exact match, notderived).
since:
   jEdit 4.2pre1



getEditorIcon
public static Image getEditorIcon()(Code)
Returns the default editor window image.



getParentDialog
public static JDialog getParentDialog(Component c)(Code)
Traverses the given component's parent tree looking for an instance of JDialog, and return it. If not found, return null.
Parameters:
  c - The component



getPluginIcon
public static Image getPluginIcon()(Code)
Returns the default plugin window image.



getShortcutLabel
public static String getShortcutLabel(String action)(Code)
Returns a label string to show users what shortcut are assigned to the action.



getStyleString
public static String getStyleString(SyntaxStyle style)(Code)
Converts a style into it's string representation.
Parameters:
  style - The style



getView
public static View getView(Component comp)(Code)
Finds the view parent of the specified component.
since:
   jEdit 4.0pre2



hideSplashScreen
public static void hideSplashScreen()(Code)
Ensures that the splash screen is not visible. This should be called before displaying any dialog boxes or windows at startup.



init
static void init()(Code)



initContinuousLayout
public static void initContinuousLayout(JSplitPane split)(Code)
Init the continuous layout flag using the jEdit's property appearance.continuousLayout
Parameters:
  split - the split. It must never be null
since:
   jEdit 4.3pre9



input
public static String input(Component comp, String name, Object def)(Code)
Displays an input dialog box and returns any text the user entered. The title of the dialog is fetched from the name.title property. The message is fetched from the name.message property.
Parameters:
  comp - The component to display the dialog for
Parameters:
  name - The name of the dialog
Parameters:
  def - The text to display by default in the input field



input
public static String input(Component comp, String name, Object[] args, Object def)(Code)
Displays an input dialog box and returns any text the user entered. The title of the dialog is fetched from the name.title property. The message is fetched from the name.message property.
Parameters:
  comp - The component to display the dialog for
Parameters:
  name - The name of the dialog
Parameters:
  def - The text to display by default in the input field
Parameters:
  args - Positional parameters to be substituted into themessage text
since:
   jEdit 3.1pre3



inputProperty
public static String inputProperty(Component comp, String name, String def)(Code)
Displays an input dialog box and returns any text the user entered. The title of the dialog is fetched from the name.title property. The message is fetched from the name.message property.
Parameters:
  comp - The component to display the dialog for
Parameters:
  name - The name of the dialog
Parameters:
  def - The property whose text to display in the input field



inputProperty
public static String inputProperty(Component comp, String name, Object[] args, String def)(Code)
Displays an input dialog box and returns any text the user entered. The title of the dialog is fetched from the name.title property. The message is fetched from the name.message property.
Parameters:
  comp - The component to display the dialog for
Parameters:
  name - The name of the dialog
Parameters:
  args - Positional parameters to be substituted into themessage text
Parameters:
  def - The property whose text to display in the input field
since:
   jEdit 3.1pre3



isAncestorOf
public static boolean isAncestorOf(Component comp1, Component comp2)(Code)
Returns if the first component is an ancestor of the second by traversing up the component hierarchy.
Parameters:
  comp1 - The ancestor
Parameters:
  comp2 - The component to check
since:
   jEdit 4.1pre5



isMiddleButton
public static boolean isMiddleButton(int modifiers)(Code)

Parameters:
  modifiers - The modifiers flag from a mouse event
since:
   jEdit 4.1pre9



isPopupTrigger
public static boolean isPopupTrigger(MouseEvent evt)(Code)
Returns if the specified event is the popup trigger event. This implements precisely defined behavior, as opposed to MouseEvent.isPopupTrigger().
Parameters:
  evt - The event
since:
   jEdit 3.2pre8



isRightButton
public static boolean isRightButton(int modifiers)(Code)

Parameters:
  modifiers - The modifiers flag from a mouse event
since:
   jEdit 4.1pre9



listConfirm
public static int listConfirm(Component comp, String name, String[] args, Object[] listModel)(Code)
Displays a confirm dialog box and returns the button pushed by the user. The title of the dialog is fetched from the name.title property. The message is fetched from the name.message property. The dialog also shows a list of entries given by the listModel parameter.
Parameters:
  comp - the parent component
Parameters:
  name - the name of the confirm dialog
Parameters:
  args - the for the message
Parameters:
  listModel - the items in the list an integer indicating the option selected by the user
since:
   jEdit 4.3pre1



listConfirm
public static int listConfirm(Component comp, String name, String[] args, Object[] listModel, List selectedItems)(Code)
Displays a confirm dialog box and returns the button pushed by the user. The title of the dialog is fetched from the name.title property. The message is fetched from the name.message property. The dialog also shows a list of entries given by the listModel parameter.
Parameters:
  comp - the parent component
Parameters:
  name - the name of the confirm dialog
Parameters:
  args - the for the message
Parameters:
  listModel - the items in the list
Parameters:
  selectedItems - give an empty list, it will contains in return the selected items an integer indicating the option selected by the user
since:
   jEdit 4.3pre12



loadGeometry
public static void loadGeometry(Window win, Container parent, String name)(Code)
Loads a windows's geometry from the properties. The geometry is loaded from the name.x, name.y, name.width and name.height properties.
Parameters:
  win - The window to load geometry from
Parameters:
  parent - The parent frame to be relative to.
Parameters:
  name - The name of the window



loadGeometry
public static void loadGeometry(Window win, String name)(Code)
Loads a windows's geometry from the properties. The geometry is loaded from the name.x, name.y, name.width and name.height properties.
Parameters:
  win - The window to load geometry from
Parameters:
  name - The name of the window



loadIcon
public static Icon loadIcon(String iconName)(Code)
Loads an icon.
Parameters:
  iconName - The icon name
since:
   jEdit 2.6pre7



loadMenu
public static JMenu loadMenu(String name)(Code)
Creates a menu. The menu label is set from the name.label property. The menu contents is taken from the name property, which is a whitespace separated list of action names. An action name of - inserts a separator in the menu.
Parameters:
  name - The menu name
See Also:   GUIUtilities.loadMenuItem(String)
since:
   jEdit 2.6pre2



loadMenu
public static JMenu loadMenu(ActionContext context, String name)(Code)
Creates a menu. The menu label is set from the name.label property. The menu contents is taken from the name property, which is a whitespace separated list of action names. An action name of - inserts a separator in the menu.
Parameters:
  context - An action context; eitherjEdit.getActionContext() orVFSBrowser.getActionContext().
Parameters:
  name - The menu name
See Also:   GUIUtilities.loadMenuItem(String)
since:
   jEdit 4.2pre1



loadMenuBar
public static JMenuBar loadMenuBar(String name)(Code)
Creates a menubar. Plugins should not need to call this method.
Parameters:
  name - The menu bar name
since:
   jEdit 3.2pre5



loadMenuBar
public static JMenuBar loadMenuBar(ActionContext context, String name)(Code)
Creates a menubar. Plugins should not need to call this method.
Parameters:
  context - An action context
Parameters:
  name - The menu bar name
since:
   jEdit 4.2pre1



loadMenuItem
public static JMenuItem loadMenuItem(String name)(Code)
Creates a menu item. The menu item is bound to the action named by name with label taken from the return value of the EditAction.getLabel method.
Parameters:
  name - The menu item name
See Also:   GUIUtilities.loadMenu(String)
since:
   jEdit 2.6pre1



loadMenuItem
public static JMenuItem loadMenuItem(String name, boolean setMnemonic)(Code)
Creates a menu item.
Parameters:
  name - The menu item name
Parameters:
  setMnemonic - True if the menu item should have a mnemonic
since:
   jEdit 3.1pre1



loadMenuItem
public static JMenuItem loadMenuItem(ActionContext context, String name, boolean setMnemonic)(Code)
Creates a menu item.
Parameters:
  context - An action context; eitherjEdit.getActionContext() orVFSBrowser.getActionContext().
Parameters:
  name - The menu item name
Parameters:
  setMnemonic - True if the menu item should have a mnemonic
since:
   jEdit 4.2pre1



loadMenuItem
public static JMenuItem loadMenuItem(EditAction editAction, boolean setMnemonic)(Code)



loadPopupMenu
public static JPopupMenu loadPopupMenu(String name)(Code)
Creates a popup menu.
Parameters:
  name - The menu name
since:
   jEdit 2.6pre2



loadPopupMenu
public static JPopupMenu loadPopupMenu(ActionContext context, String name)(Code)
Creates a popup menu.
Parameters:
  context - An action context; eitherjEdit.getActionContext() orVFSBrowser.getActionContext().
Parameters:
  name - The menu name
since:
   jEdit 4.2pre1



loadStyles
public static SyntaxStyle[] loadStyles(String family, int size)(Code)
Loads the syntax styles from the properties, giving them the specified base font family and size.
Parameters:
  family - The font family
Parameters:
  size - The font size
since:
   jEdit 3.2pre6



loadStyles
public static SyntaxStyle[] loadStyles(String family, int size, boolean color)(Code)
Loads the syntax styles from the properties, giving them the specified base font family and size.
Parameters:
  family - The font family
Parameters:
  size - The font size
Parameters:
  color - If false, the styles will be monochrome
since:
   jEdit 4.0pre4



loadToolBar
public static Box loadToolBar(String name)(Code)
Creates a toolbar.
Parameters:
  name - The toolbar name
since:
   jEdit 4.2pre2



loadToolBar
public static Box loadToolBar(ActionContext context, String name)(Code)
Creates a toolbar.
Parameters:
  context - An action context; eitherjEdit.getActionContext() orVFSBrowser.getActionContext().
Parameters:
  name - The toolbar name
since:
   jEdit 4.2pre2



loadToolButton
public static EnhancedButton loadToolButton(String name)(Code)
Loads a tool bar button. The tooltip is constructed from the name.label and name.shortcut properties and the icon is loaded from the resource named '/org/gjt/sp/jedit/icons/' suffixed with the value of the name.icon property.
Parameters:
  name - The name of the button



loadToolButton
public static EnhancedButton loadToolButton(ActionContext context, String name)(Code)
Loads a tool bar button. The tooltip is constructed from the name.label and name.shortcut properties and the icon is loaded from the resource named '/org/gjt/sp/jedit/icons/' suffixed with the value of the name.icon property.
Parameters:
  context - An action context; eitherjEdit.getActionContext() orVFSBrowser.getActionContext().
Parameters:
  name - The name of the button
since:
   jEdit 4.2pre1



message
public static void message(Component comp, String name, Object[] args)(Code)
Displays a dialog box. The title of the dialog is fetched from the name.title property. The message is fetched from the name.message property. The message is formatted by the property manager with args as positional parameters.
Parameters:
  comp - The component to display the dialog for
Parameters:
  name - The name of the dialog
Parameters:
  args - Positional parameters to be substituted into themessage text



parseColor
public static Color parseColor(String name)(Code)
Converts a color name to a color object. The name must either be a known string, such as `red', `green', etc (complete list is in the java.awt.Color class) or a hex color value prefixed with `#', for example `#ff0088'.
Parameters:
  name - The color name



parseColor
public static Color parseColor(String name, Color defaultColor)(Code)



parseStyle
public static SyntaxStyle parseStyle(String str, String family, int size) throws IllegalArgumentException(Code)
Converts a style string to a style object.
Parameters:
  str - The style string
Parameters:
  family - Style strings only specify font style, not font family
Parameters:
  size - Style strings only specify font style, not font family
exception:
  IllegalArgumentException - if the style is invalid
since:
   jEdit 3.2pre6



parseStyle
public static SyntaxStyle parseStyle(String str, String family, int size, boolean color) throws IllegalArgumentException(Code)
Converts a style string to a style object.
Parameters:
  str - The style string
Parameters:
  family - Style strings only specify font style, not font family
Parameters:
  size - Style strings only specify font style, not font family
Parameters:
  color - If false, the styles will be monochrome
exception:
  IllegalArgumentException - if the style is invalid
since:
   jEdit 4.0pre4



prettifyMenuLabel
public static String prettifyMenuLabel(String label)(Code)
`Prettifies' a menu item label by removing the `$' sign. This can be used to process the contents of an action.label property.



requestFocus
public static void requestFocus(Window win, Component comp)(Code)
Focuses on the specified component as soon as the window becomes active.
Parameters:
  win - The window
Parameters:
  comp - The component



saveGeometry
public static void saveGeometry(Window win, String name)(Code)
Saves a window's geometry to the properties. The geometry is saved to the name.x, name.y, name.width and name.height properties.
For Frame's and descendents use GUIUtilities.addSizeSaver(Frame,String) to save the sizes correct even if the Frame is in maximized or iconified state.
Parameters:
  win - The window to load geometry from
Parameters:
  name - The name of the window
See Also:   GUIUtilities.addSizeSaver(Frame,String)



saveGeometry
public static void saveGeometry(Window win, Container parent, String name)(Code)
Saves a window's geometry to the properties. The geometry is saved to the name.x, name.y, name.width and name.height properties.
For Frame's and descendents use GUIUtilities.addSizeSaver(Frame,Container,String) to save the sizes correct even if the Frame is in maximized or iconified state.
Parameters:
  win - The window to load geometry from
Parameters:
  parent - The parent frame to be relative to.
Parameters:
  name - The name of the window
See Also:   GUIUtilities.addSizeSaver(Frame,Container,String)



setIconPath
public static void setIconPath(String iconPath)(Code)
Sets the path where jEdit looks for icons.
since:
   jEdit 4.2pre5



showPopupMenu
public static void showPopupMenu(JPopupMenu popup, Component comp, int x, int y)(Code)
Shows the specified popup menu, ensuring it is displayed within the bounds of the screen.
Parameters:
  popup - The popup menu
Parameters:
  comp - The component to show it for
Parameters:
  x - The x co-ordinate
Parameters:
  y - The y co-ordinate
since:
   jEdit 4.0pre1
See Also:    javax.swing.JComponent.setComponentPopupMenu(javax.swing.JPopupMenu)
See Also:   ,
See Also:   which works better and is simpler to use: you don't have to write the code to
See Also:   show/hide popups in response to mouse events anymore.



showPopupMenu
public static void showPopupMenu(JPopupMenu popup, Component comp, int x, int y, boolean point)(Code)
Shows the specified popup menu, ensuring it is displayed within the bounds of the screen.
Parameters:
  popup - The popup menu
Parameters:
  comp - The component to show it for
Parameters:
  x - The x co-ordinate
Parameters:
  y - The y co-ordinate
Parameters:
  point - If true, then the popup originates from a single point;otherwise it will originate from the component itself. This affectspositioning in the case where the popup does not fit onscreen.
since:
   jEdit 4.1pre1



showSplashScreen
static void showSplashScreen()(Code)



showVFSFileDialog
public static String[] showVFSFileDialog(View view, String path, int type, boolean multipleSelection)(Code)
Displays a VFS file selection dialog box.
Parameters:
  view - The view, should be non-null
Parameters:
  path - The initial directory to display. May be null
Parameters:
  type - The dialog type. One oforg.gjt.sp.jedit.browser.VFSBrowser.OPEN_DIALOG,org.gjt.sp.jedit.browser.VFSBrowser.SAVE_DIALOG, ororg.gjt.sp.jedit.browser.VFSBrowser.CHOOSE_DIRECTORY_DIALOG.
Parameters:
  multipleSelection - True if multiple selection should be allowed The selected file(s)
since:
   jEdit 2.6pre2



showVFSFileDialog
public static String[] showVFSFileDialog(Dialog parent, View view, String path, int type, boolean multipleSelection)(Code)
Displays a VFS file selection dialog box. This version can specify a dialog as the parent instead of the view.
Parameters:
  view - The view, should be non-null
Parameters:
  path - The initial directory to display. May be null
Parameters:
  type - The dialog type. One oforg.gjt.sp.jedit.browser.VFSBrowser.OPEN_DIALOG,org.gjt.sp.jedit.browser.VFSBrowser.SAVE_DIALOG, ororg.gjt.sp.jedit.browser.VFSBrowser.CHOOSE_DIRECTORY_DIALOG.
Parameters:
  multipleSelection - True if multiple selection should be allowed The selected file(s)
since:
   jEdit 4.3pre10



showVFSFileDialog
public static String[] showVFSFileDialog(Frame parent, View view, String path, int type, boolean multipleSelection)(Code)
Displays a VFS file selection dialog box. This version can specify a frame as the parent instead of the view.
Parameters:
  parent - The parent frame
Parameters:
  view - The view, should be non-null
Parameters:
  path - The initial directory to display. May be null
Parameters:
  type - The dialog type. One oforg.gjt.sp.jedit.browser.VFSBrowser.OPEN_DIALOG,org.gjt.sp.jedit.browser.VFSBrowser.SAVE_DIALOG, ororg.gjt.sp.jedit.browser.VFSBrowser.CHOOSE_DIRECTORY_DIALOG.
Parameters:
  multipleSelection - True if multiple selection should be allowed The selected file(s)
since:
   jEdit 4.3pre10



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.