13.07.2015 Views

Java™ Application Development on Linux - Dator

Java™ Application Development on Linux - Dator

Java™ Application Development on Linux - Dator

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

17.3 Porting BudgetPro to SWT385Table 17.1 Major SWT widgets and their Swing equivalentsSWT widgetButt<strong>on</strong>CanvasCaretComboCompositeGroupLabelListMenuMenuItemProgressBarScaleScrollBarAnalogous Swingcomp<strong>on</strong>entJButt<strong>on</strong>java.awt.Canvas,but see alsojava.awt.Graphics2Djavax.swing.text.CaretJComboBoxJPanelJPanelJLabelJListJMenuJMenuItemA,JCheckboxMenuitem,JRadioButt<strong>on</strong>MenuitemJProgressBarJSpinnerJScrollPaneDescripti<strong>on</strong>Display widget that sends notificati<strong>on</strong> whenpressed and/or released.Composite widget that provides a surface fordrawing arbitrary graphics. May be used tocreate custom widgets.A cursor used as the inserti<strong>on</strong> point for text.Widget that permits the user to choose astring from a list of strings, or to enter a newvalue into a text field.Widget that is capable of c<strong>on</strong>taining otherwidgets.Composite widget that groups other widgetsand surrounds them with an etched borderand/or label.N<strong>on</strong>selectable widget that displays an imageor a string.Selectable widget to choose a string or stringsfrom a list of strings.User interface widget that c<strong>on</strong>tains menuitems.Selectable widget that represents an item in amenu.N<strong>on</strong>electable widget that displays progress tothe user.Widget that represents a range of numericvalues.Widget that represents a range of positivenumeric values. Used in a Composite thathas V_SCROLL and/or H_SCROLL styles. Themapping to Swing is not very tight here, sinceJScrollPane is like a combinati<strong>on</strong> ofComposite and ScrollBar.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!