Oxygen XML Editor 14.2 Author API

ro.sync.ecss.extensions.commons.editor
Class InplaceEditorUtil

java.lang.Object
  extended by ro.sync.ecss.extensions.commons.editor.InplaceEditorUtil

@API(type=INTERNAL,
     src=PUBLIC)
public class InplaceEditorUtil
extends java.lang.Object

Utility methods for preparing the in-place editors for being displayed.


Constructor Summary
InplaceEditorUtil()
           
 
Method Summary
static ro.sync.exml.view.graphics.Dimension getPreferredSize(javax.swing.JComboBox comboBox, AuthorInplaceContext context)
          Computes the preferred size for the given combo box.
static ro.sync.exml.view.graphics.Dimension getPreferredSize(javax.swing.JPanel panel, AuthorInplaceContext context)
          Computes the preferred size for the panel.
static ro.sync.exml.view.graphics.Dimension getPreferredSize(javax.swing.JTextField textField, AuthorInplaceContext context)
          Computes the preferred size for the given text field.
static void relayout(javax.swing.JComboBox comboBox, AuthorInplaceContext context)
          Computes the required size for the editor and positions the caret at the end of the text.
static void relayout(javax.swing.JTextField textField, AuthorInplaceContext context)
          Computes the required size for the editor and positions the caret at the end of the text.
static void setCaretAtEnd(javax.swing.text.JTextComponent textField, AuthorInplaceContext context)
          Sets the caret at the end of the text from the text field.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InplaceEditorUtil

public InplaceEditorUtil()
Method Detail

getPreferredSize

public static ro.sync.exml.view.graphics.Dimension getPreferredSize(javax.swing.JPanel panel,
                                                                    AuthorInplaceContext context)
Computes the preferred size for the panel.

Parameters:
panel - A panel used as an editor.
context - In-place editing context.
Returns:
The preferred size for the given context.

getPreferredSize

public static ro.sync.exml.view.graphics.Dimension getPreferredSize(javax.swing.JComboBox comboBox,
                                                                    AuthorInplaceContext context)
Computes the preferred size for the given combo box.

Parameters:
comboBox - A combo box used as an editor.
context - In-place editing context.
Returns:
The preferred size for the given context.

getPreferredSize

public static ro.sync.exml.view.graphics.Dimension getPreferredSize(javax.swing.JTextField textField,
                                                                    AuthorInplaceContext context)
Computes the preferred size for the given text field.

Parameters:
textField - A text field used as an editor.
context - In-place editing context.
Returns:
The preferred size for the given context.

relayout

public static void relayout(javax.swing.JComboBox comboBox,
                            AuthorInplaceContext context)
Computes the required size for the editor and positions the caret at the end of the text. The caret offset will also be scrolled to be visible.

Parameters:
comboBox - Combo box used for editing.
context - In-place editing context.

relayout

public static void relayout(javax.swing.JTextField textField,
                            AuthorInplaceContext context)
Computes the required size for the editor and positions the caret at the end of the text. The caret offset will also be scrolled to be visible.

Parameters:
textField - Text field used for editing.
context - In-place editing context.

setCaretAtEnd

public static void setCaretAtEnd(javax.swing.text.JTextComponent textField,
                                 AuthorInplaceContext context)
Sets the caret at the end of the text from the text field.

Parameters:
textField - Text field to be scrolled.
context - In-place editing context.

Oxygen XML Editor 14.2 Author API

© Copyright SyncRO Soft SRL 2002 - 2013. All rights reserved.