Examples of Constraints


Examples of com.intellij.openapi.actionSystem.Constraints

public class SelectConnectionActionGroup extends DefaultActionGroup {
    private static SelectConnectionAction NO_CONNECTION = new SelectConnectionAction(null);

    public SelectConnectionActionGroup(Project project) {
        add(new OpenSettingsDialogAction(), new Constraints(Anchor.FIRST, null));
        addSeparator();
        add(NO_CONNECTION);

        ProjectConnectionBundle projectConnectionBundle = ProjectConnectionBundle.getInstance(project);
        for (ConnectionHandler virtualConnectionHandler : projectConnectionBundle.getVirtualConnections()) {
View Full Code Here

Examples of com.intellij.openapi.actionSystem.Constraints

  private static void registerToolbarActions() {
    final DefaultActionGroup mainToolbar = (DefaultActionGroup) ActionManager.getInstance().getAction("MainToolBar");
    for (final AnAction anAction : _mainToolbarActions) {
      if (!isActionRegistered(anAction)) {
        _registeredMainToolbarActions.add(anAction);
        mainToolbar.add(anAction, new Constraints(Anchor.BEFORE, "RunConfiguration"));
      }
    }
  }
View Full Code Here

Examples of com.kurento.kmf.content.jsonrpc.Constraints

    // Build WebRtcEndpoint
    WebRtcEndpoint webRtcEndpoint = mp.newWebRtcEndpoint().build();
    contentSession.releaseOnTerminate(webRtcEndpoint);

    // Check if it is a transmitter or a receiver
    Constraints videoConstraints = contentSession.getVideoConstraints();

    if (videoConstraints.name().equalsIgnoreCase("SENDONLY")) {
      // it means the request is from the transmitter
      connection.setTransmitter(webRtcEndpoint, nickName);
      contentSession.publishEvent(new ContentEvent("nickname", nickName));
    } else {
      connection.addReceiver(webRtcEndpoint, contentSession);
View Full Code Here

Examples of com.sun.enterprise.tools.common.validation.constraints.data.Constraints

     * Constraints File. Constraints File provide information about the
     * <code>Constraint</code>s i.e. Constraint class name, Constraint
     * constructor arguments & thier types.
     */
    private void constructConstraints() {
        Constraints customConstraints = null;
        Constraints defaultConstraints = null;
       
        String constraintsFile =                    
            System.getProperty("constraints.file");                     //NOI18N
        ///System.out.println(consFile);
        if(constraintsFile != null){
            customConstraints = getConstraints(constraintsFile);
        }
       
        if(defaultConstraintsFile != null){
            defaultConstraints = getConstraints(defaultConstraintsFile);
        }
       
        if(customConstraints != null){
            if(defaultConstraints != null){
                int count = defaultConstraints.sizeCheckInfo();
                CheckInfo checkInfo = null;
                CheckInfo checkInfoClone = null;
                for(int i=0; i<count; i++){
                    checkInfo = defaultConstraints.getCheckInfo(i);
                    ///String str = checkInfo.dumpBeanNode();
                    checkInfoClone = (CheckInfo) checkInfo.clone();
                    ///System.out.println(checkInfoClone.dumpBeanNode());
                    customConstraints.addCheckInfo(checkInfoClone);
                }
View Full Code Here

Examples of javax.swing.SpringLayout.Constraints

    layout.putConstraint(SpringLayout.NORTH, okButton, 15, SpringLayout.SOUTH,
        languageComboBox);
    layout.putConstraint(SpringLayout.NORTH, cancelButton, 15,
        SpringLayout.SOUTH, languageComboBox);

    Constraints containerCons = layout.getConstraints(container);
    Constraints okCons = layout.getConstraints(okButton);

    containerCons.setWidth(Spring.constant(270));
    containerCons.setHeight(Spring.sum(Spring.constant(5),
        okCons.getConstraint(SOUTH)));

    getRootPane().setDefaultButton(okButton);

    pack();
    setLocationRelativeTo(getOwner());
View Full Code Here

Examples of mil.nga.giat.geowave.store.query.BasicQuery.Constraints

        LongitudeDefinition.class,
        rangeLongitude);
    constraintsPerDimension.put(
        LatitudeDefinition.class,
        rangeLatitude);
    return new Constraints(
        constraintsPerDimension);
  }
View Full Code Here

Examples of org.dyno.visual.swing.layouts.Constraints

  }

  @Override
  protected String getChildConstraints(Component child, ImportRewrite imports) {
    GroupLayout layout = (GroupLayout) layoutAdapter.getContainer().getLayout();
    Constraints constraints = layout.getConstraints(child);
    StringBuilder builder = new StringBuilder();
    String strConstraints = imports
        .addImport("org.dyno.visual.swing.layouts.Constraints");
    builder.append("new " + strConstraints + "(");
    genAlignmentCode(builder, constraints.getHorizontal(), imports);
    builder.append(", ");
    genAlignmentCode(builder, constraints.getVertical(), imports);
    builder.append(")");
    return builder.toString();
  }
View Full Code Here

Examples of org.dyno.visual.swing.layouts.Constraints

  public IStatus execute(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
    GroupLayout layout = (GroupLayout) container.getLayout();
    CompositeAdapter containerAdapter = (CompositeAdapter) WidgetAdapter.getWidgetAdapter(container);
    WidgetAdapter post = widgets.get(0);
    Component postChild = post.getWidget();
    Constraints postConstraints = layout.getConstraints(postChild);
    Alignment postAlignment = postConstraints.getVertical();
    compcons = new ArrayList<CompCons>();
    Insets insets = container.getInsets();
    int innerHeight = container.getHeight() - insets.top - insets.bottom;
    if (postAlignment instanceof Leading) {
      Leading postLeading = (Leading)postAlignment;
      int postCenter = postLeading.getLeading() + postChild.getHeight() / 2;
      for (int i = 1; i < widgets.size(); i++) {
        WidgetAdapter adapter = widgets.get(i);
        Component child = adapter.getWidget();
        Constraints constraints = layout.getConstraints(child);
        CompCons cons = new CompCons();
        cons.component = child;
        cons.constraints = constraints;
        compcons.add(cons);
        int l = postCenter - child.getHeight() / 2;
        int t = innerHeight - postCenter - child.getHeight() / 2;
        Leading leading = new Leading(l, child.getHeight(), 10, t);
        constraints = new Constraints(constraints.getHorizontal(), leading);
        layout.setConstraints(child, constraints);
      }
    } else if (postAlignment instanceof Bilateral) {
      Bilateral postBilateral = (Bilateral)postAlignment;
      int postCenter = postBilateral.getLeading() + postChild.getHeight() / 2;
      for (int i = 1; i < widgets.size(); i++) {
        WidgetAdapter adapter = widgets.get(i);
        Component child = adapter.getWidget();
        Constraints constraints = layout.getConstraints(child);
        CompCons cons = new CompCons();
        cons.component = child;
        cons.constraints = constraints;
        compcons.add(cons);
        int l = postCenter - child.getHeight() / 2;
        int t = innerHeight - postCenter - child.getHeight()/2;
        Bilateral bilateral = new Bilateral(l, t, 10);
        constraints = new Constraints(constraints.getHorizontal(), bilateral);
        layout.setConstraints(child, constraints);
      }
    } else if (postAlignment instanceof Trailing) {
      int postCenter = postChild.getY() + postChild.getHeight()/2 - insets.top;
      for (int i = 1; i < widgets.size(); i++) {
        WidgetAdapter adapter = widgets.get(i);
        Component child = adapter.getWidget();
        Constraints constraints = layout.getConstraints(child);
        CompCons cons = new CompCons();
        cons.component = child;
        cons.constraints = constraints;
        compcons.add(cons);
        int l = postCenter - child.getHeight()/2;
        int t = innerHeight - postCenter - child.getHeight()/2;
        Trailing trailing= new Trailing(t, child.getHeight(), 10, l);
        constraints = new Constraints(constraints.getHorizontal(), trailing);
        layout.setConstraints(child, constraints);
      }
    }
    container.invalidate();
    containerAdapter.doLayout();
View Full Code Here

Examples of org.dyno.visual.swing.layouts.Constraints

    Trailing trailing = (Trailing) oldconstraints.getHorizontal();
    int t = trailing.getTrailing();
    int w = child.getWidth();
    Insets insets = container.getInsets();
    int l = container.getWidth() - insets.left - insets.right - t - w;
    Constraints newconstraints = new Constraints(new Bilateral(l, t, w),
        oldconstraints.getVertical());
    container.remove(child);
    container.add(child, newconstraints);
    container.doLayout();
    container.invalidate();
View Full Code Here

Examples of org.dyno.visual.swing.layouts.Constraints

  public IStatus execute(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
    GroupLayout layout = (GroupLayout) container.getLayout();
    CompositeAdapter containerAdapter = (CompositeAdapter) WidgetAdapter.getWidgetAdapter(container);
    WidgetAdapter post = widgets.get(0);
    Component postChild = post.getWidget();
    Constraints postConstraints = layout.getConstraints(postChild);
    Alignment postAlignment = postConstraints.getHorizontal();
    compcons = new ArrayList<CompCons>();
    if (postAlignment instanceof Leading || postAlignment instanceof Bilateral) {
      int postLead;
      if (postAlignment instanceof Leading)
        postLead = ((Leading) postAlignment).getLeading();
      else
        postLead = ((Bilateral) postAlignment).getLeading();
      for (int i = 1; i < widgets.size(); i++) {
        WidgetAdapter adapter = widgets.get(i);
        Component child = adapter.getWidget();
        Constraints constraints = layout.getConstraints(child);
        CompCons cons = new CompCons();
        cons.component = child;
        cons.constraints = constraints;
        compcons.add(cons);
        Alignment alignment = constraints.getHorizontal();
        if (alignment instanceof Leading) {
          Leading leading = (Leading) alignment.clone();
          leading.setLeading(postLead);
          constraints = new Constraints(leading, constraints.getVertical());
        } else if (alignment instanceof Bilateral) {
          Bilateral bilateral = (Bilateral) alignment.clone();
          bilateral.setLeading(postLead);
          constraints = new Constraints(bilateral, constraints.getVertical());
        } else if (alignment instanceof Trailing) {
          Bilateral bilateral = new Bilateral(postLead, ((Trailing) alignment).getTrailing(), ((Trailing) alignment).getSize());
          constraints = new Constraints(bilateral, constraints.getVertical());
        }
        layout.setConstraints(child, constraints);
      }
    } else if (postAlignment instanceof Trailing) {
      Trailing postTrailing = (Trailing) postAlignment;
      int postTrail = postTrailing.getTrailing() + postChild.getWidth();
      for (int i = 1; i < widgets.size(); i++) {
        WidgetAdapter adapter = widgets.get(i);
        Component child = adapter.getWidget();
        Constraints constraints = layout.getConstraints(child);
        CompCons cons = new CompCons();
        cons.component = child;
        cons.constraints = constraints;
        compcons.add(cons);
        Alignment alignment = constraints.getHorizontal();
        if (alignment instanceof Leading) {
          int t = postTrail - child.getWidth();
          Trailing trailing = new Trailing(t, 10, child.getWidth());
          constraints = new Constraints(trailing, constraints.getVertical());
        } else if (alignment instanceof Bilateral) {
          int t = postTrail - child.getWidth();
          Trailing trailing = new Trailing(t, 10, child.getWidth());
          constraints = new Constraints(trailing, constraints.getVertical());
        } else if (alignment instanceof Trailing) {
          Trailing trailing = (Trailing) alignment.clone();
          trailing.setTrailing(postTrail - child.getWidth());
          constraints = new Constraints(trailing, constraints.getVertical());
        }
        layout.setConstraints(child, constraints);
      }
    }
    container.invalidate();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.