Examples of RelativePosition


Examples of edu.cmu.relativelayout.RelativePosition

    JButton one = new JButton("One");
    JButton two = new JButton("Two");
    JButton three = new JButton("Three");

    RelativePosition tenToTheRight = new RelativePosition(Edge.LEFT, 10, Direction.RIGHT, Edge.RIGHT);

    Binding wtf = new Binding(Edge.VERTICAL_CENTER, 12, Direction.LEFT, Edge.VERTICAL_CENTER, two);
    Binding moreWtf = new Binding(Edge.VERTICAL_CENTER, 12, Direction.LEFT, Edge.HORIZONTAL_CENTER, three);
    Binding stillMoreWtf = new Binding(Edge.TOP, 12, Direction.ABOVE, Edge.LEFT, one);

    System.out.println("Sane relation valid: " + tenToTheRight.isValid());
    System.out.println("RelativePosition 1 valid: " + wtf.isValid());
    System.out.println("RelativePosition 2 valid: " + moreWtf.isValid());
    System.out.println("RelativePosition 3 valid: " + stillMoreWtf.isValid());

    RelativeConstraints c1 = new RelativeConstraints();
View Full Code Here

Examples of edu.cmu.relativelayout.RelativePosition

    Binding leftEdge = new Binding(Edge.LEFT, 0, Direction.RIGHT, Edge.LEFT, frame);
    Binding rightEdge = new Binding(Edge.RIGHT, 0, Direction.LEFT, Edge.RIGHT, frame);
    Binding topEdge = new Binding(Edge.TOP, 0, Direction.BELOW, Edge.TOP, frame);
    Binding bottomEdge = new Binding(Edge.BOTTOM, 0, Direction.ABOVE, Edge.BOTTOM, frame);

    RelativePosition justBelow = new RelativePosition(Edge.TOP, 0, Direction.BELOW, Edge.BOTTOM);
    RelativePosition justAbove = new RelativePosition(Edge.BOTTOM, 0, Direction.ABOVE, Edge.TOP);
    RelativePosition eightBelow = new RelativePosition(Edge.TOP, 8, Direction.BELOW, Edge.BOTTOM);
    RelativePosition eightRightOf = new RelativePosition(Edge.LEFT, 8, Direction.RIGHT, Edge.RIGHT);

    RelativeConstraints toolbarConstraints = new RelativeConstraints();
    toolbarConstraints
                      .addBindings(
                                   new Binding(Edge.HORIZONTAL_CENTER, 0, Direction.LEFT, Edge.HORIZONTAL_CENTER, frame),
View Full Code Here

Examples of org.jitterbit.integration.plugin.pipeline.RelativePosition

        List<LoadSourcePluginIdentifier> plugins = Lists.newArrayList();
        for (Persistor entry : root.getChildren(ENTRY)) {
            try {
                String name = entry.getString(NAME);
                Version version = VersionFactory.fromString(entry.getString(VERSION));
                RelativePosition pos = RelativePosition.valueOf(entry.getString(POSITION));
                plugins.add(new LoadSourcePluginIdentifier(new PluginIdentifier(name, version), pos));
            } catch (Exception ex) {
                // Could happen if the settings file has become corrupt or has been edited by hand
                ErrorLog.log(PluginSettingsStoreImpl.class, "Invalid plugin entry found in the Transformation settings", ex);
            }
View Full Code Here

Examples of org.jitterbit.integration.plugin.pipeline.RelativePosition

    /**
     * Creates the EDI plugin <code>PipelinePosition</code> for the given project item.
     */
    public static PipelinePosition getPipelinePosition(EntityType type) {
        PluginIdentifier id = getPluginId();
        RelativePosition relative = getRelativePosition(type);
        return new PipelinePosition(id, type, relative, 50, true);
    }
View Full Code Here

Examples of org.jitterbit.integration.plugin.pipeline.RelativePosition

                    execOrder = Integer.parseInt(KongaXmlUtils.getChildElementValue(
                                    posElement, XmlConstants.EXECUTION_ORDER));
                } catch (Exception ex) {
                    // Keep the default value.
                }
                RelativePosition relative = RelativePosition.fromString(KongaXmlUtils.getChildElementValue(
                                posElement, XmlConstants.RELATIVE_POSITION));
                boolean optional = Boolean.parseBoolean(KongaXmlUtils.getChildElementValue(
                                posElement, XmlConstants.OPTIONAL));
                if ((subject != null) && (relative != null)) {
                    return new PipelinePosition(pluginId, subject, relative, execOrder, optional);
View Full Code Here

Examples of org.opengis.temporal.RelativePosition

public abstract class DefaultTemporalPrimitive extends DefaultTemporalObject implements TemporalPrimitive, TemporalOrder, Comparable<TemporalPrimitive> {

    public int compareTo(TemporalPrimitive that) {
    if (that==null)
      throw new IllegalArgumentException("Provided temporal object is null");
    final RelativePosition pos= this.relativePosition(that);
    if(pos==null)
      throw new ClassCastException("The provided object cannot be compared to this one");
    if(pos==RelativePosition.BEFORE)
      return -1;
    if(pos==RelativePosition.AFTER)
View Full Code Here

Examples of org.opengis.temporal.RelativePosition

       
        if (left == null || right == null) {
            return false;
        }
       
        RelativePosition pos = left.relativePosition(right);
        return pos != null && doEvaluate(pos);
    }
View Full Code Here

Examples of org.opengis.temporal.RelativePosition

        //relative position between Instant objects
        cal.set(2000, 0, 1);
        Position position = new DefaultPosition(cal.getTime());
        other = new DefaultInstant(position);
        RelativePosition result = temporalPrimitive1.relativePosition(other);
        assertFalse(temporalPrimitive2.relativePosition(other).equals(result));

        //relative position between Instant and Period
        Instant instant1 = new DefaultInstant(new DefaultPosition(cal.getTime()));
        Instant instant2 = (DefaultInstant) temporalPrimitive2;
View Full Code Here

Examples of org.waveprotocol.wave.model.document.operation.algorithm.PositionTracker.RelativePosition

   */
  OperationPair<DocOp> transformOperations(DocOp clientOp,
      DocOp serverOp) throws TransformException {
    PositionTracker positionTracker = new PositionTracker();

    RelativePosition clientPosition = positionTracker.getPosition1();
    RelativePosition serverPosition = positionTracker.getPosition2();

    // The target responsible for processing components of the client operation.
    Target clientTarget = new Target(clientPosition);

    // The target responsible for processing components of the server operation.
View Full Code Here

Examples of org.waveprotocol.wave.model.document.operation.algorithm.PositionTracker.RelativePosition

  OperationPair<DocOp> transformOperations(DocOp clientOp,
      DocOp serverOp) throws TransformException {
    try {
      PositionTracker positionTracker = new PositionTracker();

      RelativePosition clientPosition = positionTracker.getPosition1();
      RelativePosition serverPosition = positionTracker.getPosition2();

      // The target responsible for processing components of the client operation.
      Target clientTarget = new Target(clientOperation, clientPosition, clientAnnotationTracker);

      // The target responsible for processing components of the server operation.
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.