|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.swt.widgets.Widget | +--org.eclipse.swt.widgets.Control | +--org.eclipse.swt.widgets.Scrollable | +--org.eclipse.swt.widgets.Composite | +--net.sourceforge.wohenchan.LanguageChooser
This is a pulldown menu allowing manual and automatic selection of language. UI proposal at http://sourceforge.net/forum/message.php?msg_id=34059
Nested Class Summary | |
private class |
LanguageChooser.ComboModel
|
Field Summary | |
private static java.lang.String |
AUTO_DETECT_CHOICE
|
private static java.lang.String |
AUTO_DETECT_SUFFIX
|
private boolean |
m_autodetect
|
private boolean |
m_autoDetectSelect
When a call happens to setAutodetectOn(), turn this flag on. |
private org.eclipse.swt.widgets.Combo |
m_combo
|
private LanguageChooser.ComboModel |
m_comboModel
|
private java.lang.String[] |
m_contents
|
private java.util.Hashtable |
m_contentsToIndex
|
private int |
m_lastAutoChoice
|
private boolean |
m_nexttimefireselection
|
private java.util.Vector |
m_selectionListeners
|
Fields inherited from class org.eclipse.swt.widgets.Composite |
|
Fields inherited from class org.eclipse.swt.widgets.Scrollable |
|
Fields inherited from class org.eclipse.swt.widgets.Control |
|
Fields inherited from class org.eclipse.swt.widgets.Widget |
handle |
Constructor Summary | |
LanguageChooser(org.eclipse.swt.widgets.Composite parent)
|
|
LanguageChooser(org.eclipse.swt.widgets.Composite parent,
java.lang.String[] contents)
Constructs this LanguageChooser with the given strings as items in the list. |
Method Summary | |
void |
addSelectionListener(org.eclipse.swt.events.SelectionListener listener)
|
private void |
fireSelectionEvent()
|
private static java.lang.String[] |
getAllLanguages()
|
java.lang.String |
getSelectedEncoding()
|
LanguageInfoInterface |
getSelectedEncodingObject()
|
private boolean |
isAutodetectOn()
|
static void |
main(java.lang.String[] args)
|
void |
setAutodetectedChoice(int index)
This should be called by the autodetection logic in order to set the current autodetected choice. |
void |
setAutodetectedChoice(java.lang.String lang)
|
private void |
setAutodetectOn(boolean autodetect)
Sets whether or not this LanguageChooser is in manual or automatic mode. |
Methods inherited from class org.eclipse.swt.widgets.Composite |
checkSubclass, computeSize, getBorderWidth, getChildren, getLayout, getTabList, layout, layout, setFocus, setLayout, setTabList |
Methods inherited from class org.eclipse.swt.widgets.Scrollable |
computeTrim, getClientArea, getHorizontalBar, getVerticalBar |
Methods inherited from class org.eclipse.swt.widgets.Control |
addControlListener, addFocusListener, addHelpListener, addKeyListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addPaintListener, addTraverseListener, computeSize, forceFocus, getAccessible, getBackground, getBounds, getDisplay, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getParent, getShell, getSize, getToolTipText, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, redraw, redraw, removeControlListener, removeFocusListener, removeHelpListener, removeKeyListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removePaintListener, removeTraverseListener, setBackground, setBounds, setBounds, setCapture, setCursor, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setParent, setRedraw, setSize, setSize, setToolTipText, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, update |
Methods inherited from class org.eclipse.swt.widgets.Widget |
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, setData, setData, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final java.lang.String AUTO_DETECT_SUFFIX
private static final java.lang.String AUTO_DETECT_CHOICE
private final org.eclipse.swt.widgets.Combo m_combo
private final LanguageChooser.ComboModel m_comboModel
private final java.lang.String[] m_contents
private final java.util.Hashtable m_contentsToIndex
private boolean m_autodetect
private int m_lastAutoChoice
private boolean m_autoDetectSelect
private boolean m_nexttimefireselection
private java.util.Vector m_selectionListeners
Constructor Detail |
public LanguageChooser(org.eclipse.swt.widgets.Composite parent, java.lang.String[] contents)
public LanguageChooser(org.eclipse.swt.widgets.Composite parent)
Method Detail |
private static java.lang.String[] getAllLanguages()
public void addSelectionListener(org.eclipse.swt.events.SelectionListener listener)
private void fireSelectionEvent()
private void setAutodetectOn(boolean autodetect)
private boolean isAutodetectOn()
public void setAutodetectedChoice(int index)
public void setAutodetectedChoice(java.lang.String lang)
public java.lang.String getSelectedEncoding()
public LanguageInfoInterface getSelectedEncodingObject()
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |