org.gnu.gtk
Class Entry

java.lang.Object
  extended by org.gnu.glib.Struct
      extended by org.gnu.glib.GObject
          extended by org.gnu.gtk.GtkObject
              extended by org.gnu.gtk.Widget
                  extended by org.gnu.gtk.Entry
All Implemented Interfaces:
Editable
Direct Known Subclasses:
SpinButton

Deprecated. This class is part of the java-gnome 2.x family of libraries, which, due to their inefficiency and complexity, are no longer being maintained and have been abandoned by the java-gnome project. This class may in the future have an equivalent in java-gnome 4.0, try looking for org.gnome.gtk.Entry. You should be aware that there is a considerably different API in the new library: the architecture is completely different and most notably internals are no longer exposed to public view.

public class Entry
extends Widget
implements Editable

A single line text entry widget. A fairly large set of key bindings are supported by default. If the entered text is longer than the allocation of the widget, the widget will scroll so that the cursor position is visible.


Constructor Summary
Entry()
          Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Entry(org.gnu.glib.Handle handle)
          Deprecated.  
 
Method Summary
 void addListener(EntryListener listener)
          Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
 void copyClipboard()
          Deprecated. Causes the characters in the current selection to be copied to the clipboard.
 void cutClipboard()
          Deprecated. Causes the characters in the current selection to be copied to the clipboard and then deleted from the widget.
 void deleteSelection()
          Deprecated. Deletes the contents of the current selection.
 void deleteText(int start, int end)
          Deprecated. Delete a sequence of characters.
 float getAlignment()
          Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
 java.lang.String getCharacters(int start, int end)
          Deprecated. Retrieve a sequence of characters.
 EntryCompletion getCompletion()
          Deprecated.  
 int getCursorPosition()
          Deprecated. Retrieves the current cursor position.
 boolean getEditable()
          Deprecated. Retrieves whether the text contained in the widget is editable.
static Entry getEntry(org.gnu.glib.Handle handle)
          Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
 java.lang.Class getEventListenerClass(java.lang.String signal)
          Deprecated.  
 org.gnu.glib.EventType getEventType(java.lang.String signal)
          Deprecated.  
 boolean getHasFrame()
          Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
 Layout getLayout()
          Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
 Point getLayoutOffsets()
          Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
 int getMaxLength()
          Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
 java.lang.String getText()
          Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
static org.gnu.glib.Type getType()
          Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
 boolean getVisible()
          Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
 int getWidth()
          Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
 void handleToggleOverwrite()
          Deprecated.  
 int insertText(java.lang.String text, int offset)
          Deprecated. Insert text at a given point
 int layoutIndexToTextIndex(int layoutIndex)
          Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
 void pasteClipboard()
          Deprecated. Causes the contents of the clipboard to be pasted into this widget at the current cursor position.
 void removeListener(EntryListener listener)
          Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
 void selectRegion(int start, int end)
          Deprecated. Methods from Editable
 void setActivateDefaultWidget(boolean setting)
          Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
 void setAlignment(float xalign)
          Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
 void setCompletion(EntryCompletion completion)
          Deprecated.  
 void setCursorPosition(int position)
          Deprecated. Sets the cursor position
 void setEditable(boolean isEditable)
          Deprecated. Determines if the user can edit the text contained in the widget.
 void setHasFrame(boolean setting)
          Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
 void setInvisibleChar(char character)
          Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
 void setMaxLength(int max)
          Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
 void setText(java.lang.String text)
          Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
 void setVisible(boolean visible)
          Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
 void setWidth(int number)
          Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
 int textIndexToLayoutIndex(int textIndex)
          Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
 
Methods inherited from class org.gnu.gtk.Widget
activate, addAccelerator, addEvents, addListener, addListener, addListener, addListener, addListener, addListener, addListener, addListener, addListener, addListener, addListener, canActivateAccel, createContext, createLayout, draw, drawArea, drawArea, finish, getAccessible, getAllocation, getCanFocus, getColormap, getContext, getData, getDisplay, getDragData, getExtensionEvents, getModifierStyle, getName, getParent, getParentWindow, getPointer, getRootWindow, getScreen, getSensitive, getStyle, getToplevel, getWidget, getWindow, grabDefault, grabFocus, hasFocus, hasScreen, hide, hideAll, highlight, highlight, intersect, isAncestor, makeWidget, modifyStyle, popColormap, pushColormap, realize, removeAccelerator, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, reparent, setBackgroundColor, setBaseColor, setCanFocus, setColormap, setDoubleBuffered, setDragDestination, setDragIcon, setDragIconPixbuf, setDragIconStock, setDragSource, setEvents, setExtensionEvents, setFont, setForegroundColor, setMinimumSize, setName, setNoDragDestination, setNoDragSource, setSensitive, setTextColor, shapeCombineMask, show, showAll, unHighlight, unHighlight
 
Methods inherited from class org.gnu.gtk.GtkObject
destroy, sink
 
Methods inherited from class org.gnu.glib.GObject
addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addListener, collect, freezeNotify, getBooleanProperty, getData, getDoubleProperty, getFloatProperty, getGObjectFromHandle, getIntProperty, getJavaObjectProperty, getLongProperty, getProperty, getStringProperty, hasProperty, notify, removeEventHandler, removeListener, setBooleanProperty, setData, setDoubleProperty, setFloatProperty, setIntProperty, setJavaObjectProperty, setLongProperty, setProperty, setStringProperty, thawNotify
 
Methods inherited from class org.gnu.glib.Struct
equals, getHandle, getNullHandle, hashCode
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Entry

public Entry()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Creates a new Entry widget.


Entry

public Entry(org.gnu.glib.Handle handle)
Deprecated. 
Method Detail

getEntry

public static Entry getEntry(org.gnu.glib.Handle handle)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Internal static factory method to be used by Java-Gnome only.


setText

public void setText(java.lang.String text)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Sets the text in the widget to the given value, replacing the current contents.

Parameters:
text - The new text.

getText

public java.lang.String getText()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Retrieve the contents of the entry widget.

Returns:
the text of the widget

setVisible

public void setVisible(boolean visible)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Sets whether the contents of the entry are visible or not. When visibility is set to FALSE, characters are displayed as the invisible char, and will also appear that way when the text in the entry widget is copied elsewhere.

The default invisible char is the asterisk '*', but it can be changed with setInvisibleChar().


getVisible

public boolean getVisible()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Retrieves whether the contents of the entry are visible or not.


setInvisibleChar

public void setInvisibleChar(char character)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Sets the character to use in place of the actual text when setVisibility has been called to set text visibility to FALSE (ie this is the character used in "password mode" to show the user how many characters have been typed). The default invisible char is an asterisk ('*'). If you set the invisible char to 0, then the user will get no feedback at all; there will be no text on the screen as they type.


setMaxLength

public void setMaxLength(int max)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Sets the maximum allowed length of the contents of the widget. If the current contents are longer than the given length, then they will be truncated to fit.

Parameters:
max - The maximum length of the entry, or 0 for no maximum. (other than the maximum length of entries.) The value passed in will be clamped to the range 0-65536.

getMaxLength

public int getMaxLength()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Returns the maximum length of the contents of the widget.


getHasFrame

public boolean getHasFrame()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Gets the value set by setHasFrame(boolean).


getWidth

public int getWidth()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Gets the value set by setWidth(int).

Returns:
Number of chars to request space for, or negative if unset.

setActivateDefaultWidget

public void setActivateDefaultWidget(boolean setting)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

If setting is TRUE, pressing Enter in the entry will activate the default widget for the window containing the entry. This usually means that the dialog box containing the entry will be closed, since the default widget is usually one of the dialog buttons.

Parameters:
setting - TRUE to activate window's default widget on Enter keypress

setHasFrame

public void setHasFrame(boolean setting)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Sets whether the entry has a beveled frame around it.


setWidth

public void setWidth(int number)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Changes the size request of the entry to be about the right size for number characters. Note that it changes the size request, the size can still be affected by how you pack the widget into containers. If n_chars is -1, the size reverts to the default entry size.

Parameters:
number - Width in Characters

getLayout

public Layout getLayout()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Gets the Layout used to display the entry. This layout is useful to convert text positions to pixel positions in combination with getLayoutOffsets.

Returns:
The PangoLayout for this entry

getLayoutOffsets

public Point getLayoutOffsets()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Obtains the position of the Layout used to render text in the entry, in widget coordinates. Useful if you want to line up the text in the entry with some other text, e.g. when using the entry to implement editable cells in a sheet widget.

Returns:
A Point identifying the x and y offset of the layout.

setAlignment

public void setAlignment(float xalign)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Sets the alignment for the contents of the entry. This controls the horizontal positioning of the contents when the displayed text is shorter than the width of the entry.

Parameters:
xalign - The horizontal alignment, from 0 (left) to 1 (right). Reversed for RTL layouts.

getAlignment

public float getAlignment()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Gets the value set by setAlignment(float).


layoutIndexToTextIndex

public int layoutIndexToTextIndex(int layoutIndex)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Converts from a position in the entry contents (returned by getText()) to a position in the entry's PangoLayout (returned by getLayout(), with text retrieved via Layout.getText()).


textIndexToLayoutIndex

public int textIndexToLayoutIndex(int textIndex)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Converts from a position in the entry's PangoLayout (returned by getLayout()) to a position in the entry contents (returned by getText()).


getType

public static org.gnu.glib.Type getType()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Retrieve the runtime type used by the GLib library.


addListener

public void addListener(EntryListener listener)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Register an object to handle spin events.

See Also:
EntryListener

removeListener

public void removeListener(EntryListener listener)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Removes a listener

See Also:
addListener(EntryListener)

getEventListenerClass

public java.lang.Class getEventListenerClass(java.lang.String signal)
Deprecated. 
Overrides:
getEventListenerClass in class Widget

getEventType

public org.gnu.glib.EventType getEventType(java.lang.String signal)
Deprecated. 
Overrides:
getEventType in class Widget

handleToggleOverwrite

public void handleToggleOverwrite()
Deprecated. 

setCompletion

public void setCompletion(EntryCompletion completion)
Deprecated. 

getCompletion

public EntryCompletion getCompletion()
Deprecated. 

selectRegion

public void selectRegion(int start,
                         int end)
Deprecated. 
Methods from Editable

Specified by:
selectRegion in interface Editable

insertText

public int insertText(java.lang.String text,
                      int offset)
Deprecated. 
Description copied from interface: Editable
Insert text at a given point

Specified by:
insertText in interface Editable
Parameters:
text - The text to insert.
offset - The offset into the buffer to begin the insert.
Returns:
The current offset after the text has been inserted.

deleteText

public void deleteText(int start,
                       int end)
Deprecated. 
Description copied from interface: Editable
Delete a sequence of characters. The characters that are deleted are those characters from position start up to, but not including end. If end is a negative number then the characters to be deleted are from start until the end of the text.

Specified by:
deleteText in interface Editable

getCharacters

public java.lang.String getCharacters(int start,
                                      int end)
Deprecated. 
Description copied from interface: Editable
Retrieve a sequence of characters. The characters that are retrieved are those characters from position start up to, but not including end. If end is negative, then the characters retrieved will be those characters from start until the end of the text.

Specified by:
getCharacters in interface Editable

cutClipboard

public void cutClipboard()
Deprecated. 
Description copied from interface: Editable
Causes the characters in the current selection to be copied to the clipboard and then deleted from the widget.

Specified by:
cutClipboard in interface Editable

copyClipboard

public void copyClipboard()
Deprecated. 
Description copied from interface: Editable
Causes the characters in the current selection to be copied to the clipboard.

Specified by:
copyClipboard in interface Editable

pasteClipboard

public void pasteClipboard()
Deprecated. 
Description copied from interface: Editable
Causes the contents of the clipboard to be pasted into this widget at the current cursor position.

Specified by:
pasteClipboard in interface Editable

deleteSelection

public void deleteSelection()
Deprecated. 
Description copied from interface: Editable
Deletes the contents of the current selection.

Specified by:
deleteSelection in interface Editable

setCursorPosition

public void setCursorPosition(int position)
Deprecated. 
Description copied from interface: Editable
Sets the cursor position

Specified by:
setCursorPosition in interface Editable
Parameters:
position - The position of the cursor. The cursor is displayed before the character with the given (base 0) index in the widget. The value must be less than or equal to the number of characters in the widget.

getCursorPosition

public int getCursorPosition()
Deprecated. 
Description copied from interface: Editable
Retrieves the current cursor position.

Specified by:
getCursorPosition in interface Editable
Returns:
A 0 based integer that identifies the offset position of the cursor from the beginning of the text.

setEditable

public void setEditable(boolean isEditable)
Deprecated. 
Description copied from interface: Editable
Determines if the user can edit the text contained in the widget.

Specified by:
setEditable in interface Editable
Parameters:
isEditable - true if the user can edit the text.

getEditable

public boolean getEditable()
Deprecated. 
Description copied from interface: Editable
Retrieves whether the text contained in the widget is editable.

Specified by:
getEditable in interface Editable
Returns:
true if the text is editable.