|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.zekr.ui.helper.FormUtils
public class FormUtils
Field Summary | |
---|---|
static java.lang.String |
URL_DATA
|
Constructor Summary | |
---|---|
FormUtils()
|
Method Summary | |
---|---|
static java.lang.String |
addAmpersand(java.lang.String menuText)
check a menuText entry for an ampersand and if not found prepend the menuText with one |
static void |
addEditableRow(org.eclipse.swt.widgets.Table table,
java.lang.String str1,
java.lang.String str2)
|
static void |
addLinkListener(org.eclipse.swt.widgets.Widget widget)
Adds click listener to the link widget. |
static void |
addRow(org.eclipse.swt.widgets.Table table,
java.lang.String str1,
java.lang.String str2)
|
static int |
buttonLength(org.eclipse.swt.widgets.Button button1,
org.eclipse.swt.widgets.Button button2)
Return the maximum length for a button when two buttons are given |
static int |
buttonLength(org.eclipse.swt.widgets.Button button1,
org.eclipse.swt.widgets.Button button2,
org.eclipse.swt.widgets.Button button3)
Return the maximum length for a button when three buttons are given. |
static int |
buttonLength(int minimum,
org.eclipse.swt.widgets.Button button1,
org.eclipse.swt.widgets.Button button2)
Return the maximum length for a button when two buttons and a minimum length are given. |
static int |
buttonLength(int minimum,
org.eclipse.swt.widgets.Button button1,
org.eclipse.swt.widgets.Button button2,
org.eclipse.swt.widgets.Button button3)
return the maximum length for a button when three buttons and a minimum length are given |
static org.eclipse.swt.graphics.Point |
getCenter(org.eclipse.swt.widgets.Shell parent,
org.eclipse.swt.widgets.Shell shell)
|
static org.eclipse.swt.widgets.Table |
getEditableTable(org.eclipse.swt.widgets.Composite parent,
java.util.Map map,
java.lang.String title1,
java.lang.String title2,
int width1,
int width2,
java.lang.Object layoutData,
int style)
|
static org.eclipse.swt.graphics.Point |
getScreenCenter(org.eclipse.swt.widgets.Display display,
org.eclipse.swt.graphics.Rectangle widgetSize)
This method shall be used to find upper-left position of a Rectangle , which then be
centered on the screen. |
static org.eclipse.swt.graphics.Point |
getScreenSize(org.eclipse.swt.widgets.Display display)
|
static org.eclipse.swt.widgets.Table |
getTableFromMap(org.eclipse.swt.widgets.Composite parent,
java.util.Map map,
java.lang.String title1,
java.lang.String title2,
int width1,
int width2,
java.lang.Object layoutData,
int style)
|
static void |
limitSize(org.eclipse.swt.widgets.Shell shell,
int width,
int height)
Limits the size of the shell to the given values. |
static void |
removeSelection(org.eclipse.swt.widgets.Table table)
|
static int |
toSwtDirection(java.lang.String direction)
|
static void |
updateTable(org.eclipse.swt.widgets.Table table,
java.util.Map map)
For internal use only. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String URL_DATA
Constructor Detail |
---|
public FormUtils()
Method Detail |
---|
public static org.eclipse.swt.graphics.Point getScreenSize(org.eclipse.swt.widgets.Display display)
display
- The Device
to extract it's bounds.
Point
containing (maxX, maxY) of device.public static org.eclipse.swt.graphics.Point getScreenCenter(org.eclipse.swt.widgets.Display display, org.eclipse.swt.graphics.Rectangle widgetSize)
Rectangle
, which then be
centered on the screen.
display
- The display to extract it's bounds.widgetSize
- widget size and position.
public static org.eclipse.swt.widgets.Table getTableFromMap(org.eclipse.swt.widgets.Composite parent, java.util.Map map, java.lang.String title1, java.lang.String title2, int width1, int width2, java.lang.Object layoutData, int style)
public static org.eclipse.swt.widgets.Table getEditableTable(org.eclipse.swt.widgets.Composite parent, java.util.Map map, java.lang.String title1, java.lang.String title2, int width1, int width2, java.lang.Object layoutData, int style)
public static void addRow(org.eclipse.swt.widgets.Table table, java.lang.String str1, java.lang.String str2)
public static void addEditableRow(org.eclipse.swt.widgets.Table table, java.lang.String str1, java.lang.String str2)
public static void updateTable(org.eclipse.swt.widgets.Table table, java.util.Map map)
public static int toSwtDirection(java.lang.String direction)
direction
- can be either rtl or ltr
SWT.RIGHT_TO_LEFT
if direction is rtl (ignoring the case),
SWT.LEFT_TO_RIGHT
otherwise.public static void removeSelection(org.eclipse.swt.widgets.Table table)
public static org.eclipse.swt.graphics.Point getCenter(org.eclipse.swt.widgets.Shell parent, org.eclipse.swt.widgets.Shell shell)
public static java.lang.String addAmpersand(java.lang.String menuText)
menuText
- the menuText to be shown, i.e. the translated text with possible & markers to
show which key on the keyboard will activate the menu item
public static int buttonLength(org.eclipse.swt.widgets.Button button1, org.eclipse.swt.widgets.Button button2)
button1
- a first button Button objectbutton2
- a second button Button object
public static int buttonLength(int minimum, org.eclipse.swt.widgets.Button button1, org.eclipse.swt.widgets.Button button2)
minimum
- an integer giving the minimum length a button has to havebutton1
- a first button Button objectbutton2
- a second button Button object
public static int buttonLength(org.eclipse.swt.widgets.Button button1, org.eclipse.swt.widgets.Button button2, org.eclipse.swt.widgets.Button button3)
button1
- a first buttonbutton2
- a second button
public static int buttonLength(int minimum, org.eclipse.swt.widgets.Button button1, org.eclipse.swt.widgets.Button button2, org.eclipse.swt.widgets.Button button3)
minimum
- an integer giving the minimum length a button has to havebutton1
- a first buttonbutton2
- a second button
public static void addLinkListener(org.eclipse.swt.widgets.Widget widget)
widget
- public static void limitSize(org.eclipse.swt.widgets.Shell shell, int width, int height)
shell
- the Shell to limit
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |