Package org.eclipse.wb.gef.core.policies

Examples of org.eclipse.wb.gef.core.policies.EditPolicy


    private boolean decorateChild_childOnly(final EditPart child) {
      return ExecutionUtils.runIgnore(new RunnableEx() {
        public void run() throws Exception {
          Constructor<?> constructor = m_policyClass.getConstructors()[0];
          EditPolicy editPolicy = (EditPolicy) constructor.newInstance(child.getModel());
          child.installEditPolicy(SELECTION_ID, editPolicy);
        }
      });
    }
View Full Code Here


    private void decorateChild_layoutAndChild(final EditPart child) {
      ExecutionUtils.runIgnore(new RunnableEx() {
        public void run() throws Exception {
          Constructor<?> constructor = m_policyClass.getConstructors()[0];
          EditPolicy editPolicy = (EditPolicy) constructor.newInstance(m_layout, child.getModel());
          child.installEditPolicy(SELECTION_ID, editPolicy);
        }
      });
    }
View Full Code Here

    private boolean decorateChild_childOnly(final EditPart child) {
      return ExecutionUtils.runIgnore(new RunnableEx() {
        public void run() throws Exception {
          Constructor<?> constructor = m_policyClass.getConstructors()[0];
          EditPolicy editPolicy = (EditPolicy) constructor.newInstance(child.getModel());
          child.installEditPolicy(SELECTION_ID, editPolicy);
        }
      });
    }
View Full Code Here

    private void decorateChild_layoutAndChild(final EditPart child) {
      ExecutionUtils.runIgnore(new RunnableEx() {
        public void run() throws Exception {
          Constructor<?> constructor = m_policyClass.getConstructors()[0];
          EditPolicy editPolicy = (EditPolicy) constructor.newInstance(m_layout, child.getModel());
          child.installEditPolicy(SELECTION_ID, editPolicy);
        }
      });
    }
View Full Code Here

  ////////////////////////////////////////////////////////////////////////////
  @Override
  protected void decorateChild(EditPart child) {
    if (child.getModel() instanceof WidgetInfo) {
      WidgetInfo widget = (WidgetInfo) child.getModel();
      EditPolicy selectionPolicy = new FlexSelectionEditPolicy(m_layout, widget);
      child.installEditPolicy(EditPolicy.SELECTION_ROLE, new UIObjectSelectionEditPolicy(widget));
      child.installEditPolicy(selectionPolicy);
    }
  }
View Full Code Here

  ////////////////////////////////////////////////////////////////////////////
  @Override
  protected void decorateChild(EditPart child) {
    Object childModel = child.getModel();
    if (childModel instanceof IWidgetInfo) {
      EditPolicy policy = new AbsoluteLayoutSelectionEditPolicy<T>();
      child.installEditPolicy(EditPolicy.SELECTION_ROLE, policy);
    }
  }
View Full Code Here

  ////////////////////////////////////////////////////////////////////////////
  @Override
  protected void decorateChild(EditPart child) {
    Object childModel = child.getModel();
    if (childModel instanceof IWidgetInfo) {
      EditPolicy policy = new LayoutPanelSelectionEditPolicy<W>(m_panel);
      child.installEditPolicy(EditPolicy.SELECTION_ROLE, policy);
    }
  }
View Full Code Here

  ////////////////////////////////////////////////////////////////////////////
  @Override
  protected void decorateChild(EditPart child) {
    Object childModel = child.getModel();
    if (childModel instanceof WidgetInfo) {
      EditPolicy policy = new AbsoluteLayoutSelectionEditPolicy<WidgetInfo>();
      child.installEditPolicy(EditPolicy.SELECTION_ROLE, policy);
    }
  }
View Full Code Here

  /**
   * @return <code>true</code> if given {@link EditPart} has {@link TopSelectionEditPolicy}.
   */
  private static boolean hasTopSelectionPolicy(EditPart editPart) {
    EditPolicy policy = editPart.getEditPolicy(EditPolicy.SELECTION_ROLE);
    return policy instanceof TopSelectionEditPolicy;
  }
View Full Code Here

  @Override
  protected void decorateChild(EditPart child) {
    Object childModel = child.getModel();
    if (childModel instanceof WidgetInfo) {
      EditPolicy policy = new AbsoluteLayoutSelectionEditPolicy<WidgetInfo>();
      m_oldSelectionPolicies.put(child, child.getEditPolicy(EditPolicy.SELECTION_ROLE));
      child.installEditPolicy(EditPolicy.SELECTION_ROLE, policy);
    }
  }
View Full Code Here

TOP

Related Classes of org.eclipse.wb.gef.core.policies.EditPolicy

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.