@Override
 protected void createButtons(Composite parent, FormToolkit toolkit) {
   super.createButtons(parent, toolkit);
   enableButtons();
   if (parent.getData("filtered") != null) { // $NON-NLS-1$
     GridLayout layout = (GridLayout) fButtonContainer.getLayout();
     layout.marginHeight = 28;
   }
 }
  @Override
  protected State getState(Composite container, SwtMetawidget metawidget) {

    State state = (State) container.getData(getClass().getName());

    if (state == null) {
      state = new State();
      container.setData(getClass().getName(), state);
    }

    return state;
  }
Beispiel #3
0
 /**
  * Returns a <code>java.awt.Frame</code> which is the embedded frame associated with the specified
  * composite.
  *
  * @param parent the parent <code>Composite</code> of the <code>java.awt.Frame</code>
  * @return a <code>java.awt.Frame</code> the embedded frame or <code>null</code>.
  * @exception IllegalArgumentException
  *     <ul>
  *       <li>ERROR_NULL_ARGUMENT - if the parent is null
  *     </ul>
  *
  * @since 3.2
  */
 public static Frame getFrame(Composite parent) {
   if (parent == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
   if ((parent.getStyle() & SWT.EMBEDDED) == 0) return null;
   return (Frame) parent.getData(EMBEDDED_FRAME_KEY);
 }