Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Rap10M2 News"

m (RWT)
m (added to RAP category)
Line 84: Line 84:
  
 
The above features are just the ones that are new since the previous milestone build.
 
The above features are just the ones that are new since the previous milestone build.
 +
 +
[[Category:RAP]]

Revision as of 17:55, 7 June 2007

| RAP wiki home | RAP project home |

RAP 1.0 M2 - New and Noteworthy

Here are some of the more noteworthy things available in milestone build M2 (March 2, 2007) which is now available for download.


JFace

Dialogs RAP JFace now includes the base classes to implement dialogs like Window, WindowManager, Dialog, and IconAndMessageDialog and provides the most often used dialogs.
  • InputDialog

RapInputDialog.png

  • MessageDialog

RapQuestionDialog.png

  • ErrorDialog

File:RapErrorDialog.png

Due to the distributed nature of RAP, the way how the result is passed back to the caller differs from JFace. RAP JFace provides an IWindowCallback interface whose windowClosed method is called with the returnCode as a parameter when a dialog was closed.


RWT

ModifyEvent RWT now supports the ModifyEvent. The two widgets that benefit from this are Text and Spinner.

Though implementing a ModifyListener does not differ from SWT as You can see below, the inner workings do differ. In contrary to SWT that sends a ModifyEvent immediately, RWT uses a delay of currently 500 ms after which the server is notified about changes.

  Text text = new Text( parent, RWT.SINGLE );
  text.addModifyListener( new ModifyListener() {
    public void modifyText( ModifyEvent event ) {
      // update model with changed text
    }
  } );

Spinner Now there exists a Spinner widget that works much the same as in SWT.

RapSpinner.png

Default Button The default button was implemented, that You can now tell the Shell which of its buttons should behave as the default button. Just to have something to write for the next milestone news, the default button is not yet highlighted;)
Shell enhancements For dependent shells (aka dialog shells, those created with the Shell( Shell ) or Shell( Shell, int ) constructor), the escape key closes the shell.
Double click For List, Tree, and CTabFolder RWT now recognizes a double-click that is reported via the widgetDefaultSelected method of the SelectionEvent.

The screenshot below is taken from the RWT online demo, feel free to try it out yourself. File:RapDoubleClick.png

Focus control and FocusEvent In this development cycle we also put our focus on the focus. The methods setFocus, forceFocus, and isFocusControl of the Control class allow You to focus a control and query whether the control has the input focus. The getFocusControl on class Display tells You which control currently has the input focus.

When adding a FocusListener to a control, it will be notified about focusLost and focusGained events.

As of now, not all controls do visually indicate that they currently are focused.

Text enhancements The text widget has two new mini-features:
  • The setTextLimit and getTextLimit methods can be use to control and query the number of characters that may be entered.
  • All methods to control the text selection like setSelection and getSelection are implemented.

The following snippet, taken from the SelectionListener of the Show Selection button,

  Point sel= result.getSelection();
  String selText = text.getSelectionText();
  String msg = "Selection from " + sel.x + " to " + sel.y + " is " + selText;
  label.setText( msg );        

leads to what is shown below

RapTextSelection.png


The above features are just the ones that are new since the previous milestone build.

Copyright © Eclipse Foundation, Inc. All Rights Reserved.