* @see org.eclipse.jface.action.ContributionItem#fill(org.eclipse.swt.widgets.Composite)
*/
@Override
public void fill( Composite c ) {
Label separator = new Label(c, SWT.SEPARATOR);
StatusLineLayoutData data = new StatusLineLayoutData();
separator.setLayoutData(data);
data.widthHint = 1;
data.heightHint = STATUS_LINE_HEIGHT;
combo = new Combo(c, SWT.BORDER|SWT.CENTER);
combo.addKeyListener(this);
combo.addFocusListener(this);
combo.addListener(SWT.MouseDown, new Listener(){
public void handleEvent(Event e){
if( combo.getText().contains(":") ) //$NON-NLS-1$
formatForEditing();
}
});
combo.addSelectionListener( new SelectionListener(){
public void widgetSelected( SelectionEvent e ) {
if( combo.getText().contains(":") ) //$NON-NLS-1$
formatForEditing();
go();
}
public void widgetDefaultSelected( SelectionEvent e ) {
}
});
data = new StatusLineLayoutData();
combo.setLayoutData(data);
updateScale();
data.widthHint = 80;
data.heightHint = STATUS_LINE_HEIGHT;
this.mapPart.setFont(combo);