|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--guk.editIM.EditIMPopups
Helper for the EditIM Input Method EditorI: displays some sub menus like file requesters and choice popups and similar stuff. Throws results as ActionEvents. Delegates tasks to other classes.
Field Summary | |
(package private) ClipWindow |
clipper
An instance of an helper class which will provide an utility window to use the system clipboard more easily. |
(package private) FileRequester |
fileReq
An instance of an helper class which will provide the file requester (with special features for the input method editor). |
(package private) javax.swing.JFrame |
glyphDialog
|
(package private) java.util.Vector |
glyphHistory
|
(package private) javax.swing.JPanel |
glyphHistoryBar
|
(package private) javax.swing.JComboBox |
glyphHistoryCombo
|
(package private) javax.swing.JComboBox |
glyphModeCombo
|
(package private) static int |
glyphPalSize
The history Vector for the glyph button and the dialog for that plus the combobox used for the history and a JPanel to show buttons and combo boxes which also hold the history |
(package private) HelpEditIM |
help
An instance of an helper class which will provide the help and about popup windows. |
(package private) java.lang.Object[] |
localeButtons
An array of things that might help to label our buttons for the locale button related choice popups |
(package private) MenuHelpers |
menu
The MenuHelpers class provides functions like creating menu items and buttons. |
(package private) java.awt.Frame |
pframe
A Frame to where the type to client function applies (for the current implementation, can be any Component) |
Constructor Summary | |
EditIMPopups(MenuHelpers menuHelper)
The constructor needs a MenuHelpers instance for generic settings like font, action listener and centering base. |
Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent e)
The main point where events are coming in. |
(package private) void |
assignLocaleButton(java.lang.String localeS)
Builds a popup where the user can select a locale button slot to trigger a setlocalebuttonlocale button locale command. |
(package private) void |
glyphListener(java.lang.String type,
char glyph)
Postprocess glyph dialog results and create commands in proper syntax for our listener, or take action directly. |
(package private) void |
glyphPopup(char glyph,
boolean popup)
Popup a menu that allows to copy/add/type (to clipboard, table2 or client respectively) the current glyph or one from a glyph history. |
(package private) int |
queryLocaleButton(java.lang.Object[] question)
Generic "ask to select a locale button" helper. |
void |
setGlyphBar(javax.swing.JPanel glyphBar)
Hand over a panel where we can present glyph related interaction components. |
void |
setLocaleButtons(java.lang.Object[] buttons)
Hand over buttons to us, to ease labelling the choice items in every locale button related popup menu. |
void |
setTypeTarget(java.awt.Frame pFrame)
Select a Frame (currently, a Component would be enough) to which it sends simulated keypresses (used in the glyph menu). |
Methods inherited from class java.lang.Object |
|
Field Detail |
MenuHelpers menu
java.awt.Frame pframe
HelpEditIM help
FileRequester fileReq
ClipWindow clipper
java.lang.Object[] localeButtons
static final int glyphPalSize
java.util.Vector glyphHistory
javax.swing.JFrame glyphDialog
javax.swing.JComboBox glyphHistoryCombo
javax.swing.JPanel glyphHistoryBar
javax.swing.JComboBox glyphModeCombo
Constructor Detail |
public EditIMPopups(MenuHelpers menuHelper)
menuHelper
- Provides functions like creating menu items.
Should have the listener and font set.Method Detail |
void glyphPopup(char glyph, boolean popup)
glyph
- The glyph for which the menu is to be presented
and which should be added to the history / palette area.
The history forgets the oldest entry when it runs out of space.popup
- Only when this is true, a menu will pop up.
Otherwise, only the history / palette is updated.void glyphListener(java.lang.String type, char glyph)
type
- The kind of action that should be taken, in
form of a string (jumpfield, addcharif, type, copy, combo
or cancel).glyph
- The character to which the command should
apply, unless the type string already specifies one.public void setGlyphBar(javax.swing.JPanel glyphBar)
glyphBar
- The area where an extended glyph GUI
can be displayed (normally no popup) by the glyph
interaction components above.public void setTypeTarget(java.awt.Frame pFrame)
pFrame
- A frame to which, by means of posting KeyEvents,
this object should be able to send simulated key presses. Used
for the type to client function, which will be unavailable when
no pFrame is set.void assignLocaleButton(java.lang.String localeS)
localeS
- The locale name to be appended to the command.int queryLocaleButton(java.lang.Object[] question)
public void setLocaleButtons(java.lang.Object[] buttons)
buttons
- Some array of buttons or other objects. Their
names or whatever seems to properly describe them are used
to fill the choice menu that allows the user to select a
button.public void actionPerformed(java.awt.event.ActionEvent e)
this is an ActionListener, so it must handle actionPerformed. All requests are coming in through this method. Each type of request should be handled by calling one or more of the private methods of this class. This is the common parser for all. Some of the methods above throw events back by using menu.tellListener().
Accepted commands: glyphbutton CHAR - popup menu with history selection and buttons to copy or add to table2 or type to client glyphbuttonupdate CHAR - just update the history selection (which has an additional non-popup user interface in current versions, so the popup menu mode is no longer needed) glyphbarbutton CHAR - perform action as selected by glyphModeCombo glpyhbarcombo updated - glyphModeCombo value has changed GLYtype CHAR - send char as key event to our pframe GLYcopy CHAR - send char to clipboard GLYjumpfield CHAR - redirected to jumpfield CHAR (scroll to...) GLYaddcharif CHAR - redirected to addcharif CHAR (add to table) (all GLY... commands are also internally used by the glyph popup) loadlocale file - ask for a filename AND type to be loaded mergelocale file - as loadlocale file, but for merge. savelocale file - ask for filename AND type setlocalebutton locale - ask for a button number showwindow help - show help window (JTextArea/...) showwindow about - show about window and some properties does not need to show lots of status (hard to implement) clipmenu open - show window with system clipboard interface errormessage text - show text as an error message popup typeclient glyph - pretend that somebody typed the glyph into the window of our creator! (currently only triggered by glyphbutton processing and also DONE right there).
actionPerformed
in interface java.awt.event.ActionListener
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |