Examples of Anchor


Examples of com.google.gwt.user.client.ui.Anchor

     *            The caption of the zoom level
     * @param time
     *            The time in milliseconds of the zoom level
     */
    private void addZoomLevel(String caption, Long time) {
        Anchor level = new Anchor(caption);
        level.addClickHandler(zoomClickHandler);
        zoomLevels.put(level, time);
        zoomBar.add(level);
    }
View Full Code Here

Examples of com.google.gwt.user.client.ui.Anchor

    }
   
    //The url loaded by this method can be intercepted by
    //WebViewClient.shouldOverrideUrlLoading
    public static void loadUrl(String url) {
    Anchor a = new Anchor("", url);
    RootLayoutPanel.get().add(a);
    NativeEvent event = Document.get().createClickEvent(1, 1, 1, 1, 1, false, false, false, false);
    a.getElement().dispatchEvent(event);
    RootLayoutPanel.get().remove(a);
  }
View Full Code Here

Examples of com.itextpdf.text.Anchor

                    }
                    break;
                }
                case Element.ANCHOR: {
                  leadingCount++;
                    Anchor anchor = (Anchor) element;
                    String url = anchor.getReference();
                    leading = anchor.getLeading();
                    if (url != null) {
                        anchorAction = new PdfAction(url);
                    }
                    // we process the element
                    element.process(this);
View Full Code Here

Examples of com.lowagie.text.Anchor

                    }
                    break;
                }
                case Element.ANCHOR: {
                  leadingCount++;
                    Anchor anchor = (Anchor) element;
                    String url = anchor.getReference();
                    leading = anchor.getLeading();
                    if (url != null) {
                        anchorAction = new PdfAction(url);
                    }
                    // we process the element
                    element.process(this);
View Full Code Here

Examples of com.sencha.gxt.core.client.Style.Anchor

   */
  public final Point getAlignToXY(Element elem, AnchorAlignment alignment, int ox, int oy) {
    XElement el = XElement.as(elem);

    boolean constrainViewport = alignment.isConstrainViewport();
    Anchor anch1 = alignment.getAlign();
    Anchor anch2 = alignment.getTargetAlign();
    // Subtract the aligned el's internal xy from the target's offset xy
    // plus custom offset to get the aligned el's new offset xy
    Point a1 = getAnchorXY(anch1, true);
    Point a2 = el.getAnchorXY(anch2, false);

    int x = a2.getX() - a1.getX() + ox;
    int y = a2.getY() - a1.getY() + oy;

    if (constrainViewport) {
      // constrain the aligned el to viewport if necessary
      int w = getOffsetWidth();
      int h = getOffsetHeight();
      Region r = el.getRegion();
      // 5px of margin for ie
      int dw = XDOM.getViewWidth(false) - 10;
      int dh = XDOM.getViewHeight(false) - 10;

      // If we are at a viewport boundary and the aligned el is anchored on a
      // target border that is
      // perpendicular to the vp border, allow the aligned el to slide on that
      // border,
      // otherwise swap the aligned el to the opposite border of the target.
      boolean swapY = (anch1.isTop() && anch2.isBottom()) || (anch1.isBottom() && anch2.isTop());
      boolean swapX = (anch1.isRight() && anch2.isLeft()) || (anch1.isLeft() && anch2.isRight());

      // EXTGWT-1730 only applying 5 when there is scrolling. 5 may be able to
      // be removed
      // but not sure why this was added in first place. it exists in 2.0
      int scrollX = XDOM.getBodyScrollLeft();
View Full Code Here

Examples of it.unimi.dsi.mg4j.util.parser.callback.AnchorExtractor.Anchor

      public void close() {}
      public Object content( int field ) throws IOException {
        ensureDocumentIndex( index );
        ObjectArrayList<Anchor> result = new ObjectArrayList<Anchor>();
        for( Map.Entry<Integer, ? extends CharSequence> entry: virtual[ index ].entrySet() )
          result.add( new Anchor( new MutableString( entry.getKey().toString() ), new MutableString( entry.getValue() ) ) );
        return result;
      }
      public CharSequence title() { return null; }
      public CharSequence uri() { return null; }
      public WordReader wordReader( int field ) { return new FastBufferedReader(); }
View Full Code Here

Examples of net.citizensnpcs.util.Anchor

                npc.getCitizen().getTrait(Anchors.class).addAnchor(id.asString(), location);
                return;

            case ASSUME:
            {
                Anchor n = npc.getCitizen().getTrait(Anchors.class)
                        .getAnchor(id.asString());
                if (n == null)
                    dB.echoError(scriptEntry.getResidingQueue(), "Invalid anchor name '" + id.asString() + "'");
                else
                    npc.getEntity().teleport(n.getLocation());
            }
                return;

            case WALKNEAR:
            {
                Anchor n = npc.getCitizen().getTrait(Anchors.class)
                        .getAnchor(id.asString());
                if (n == null)
                    dB.echoError(scriptEntry.getResidingQueue(), "Invalid anchor name '" + id.asString() + "'");
                else if (range == null)
                    dB.echoError(scriptEntry.getResidingQueue(), "Must specify a range!");
                else
                    npc.getNavigator().setTarget(
                        Utilities.getWalkableLocationNear(n.getLocation(), range.asInt()));
            }
                return;

            case WALKTO:
            {
                Anchor n = npc.getCitizen().getTrait(Anchors.class)
                        .getAnchor(id.asString());
                if (n == null)
                    dB.echoError(scriptEntry.getResidingQueue(), "Invalid anchor name '" + id.asString() + "'");
                else
                    npc.getNavigator().setTarget(n.getLocation());
            }
                return;

            case REMOVE:
            {
                Anchor n = npc.getCitizen().getTrait(Anchors.class)
                        .getAnchor(id.asString());
                if (n == null)
                    dB.echoError(scriptEntry.getResidingQueue(), "Invalid anchor name '" + id.asString() + "'");
                else
                    npc.getCitizen().getTrait(Anchors.class).removeAnchor(n);
View Full Code Here

Examples of net.sf.wicketdemo.common.component.Anchor

        addCategoryOptions(categoryItem);
      }
     
      private void addCategoryAnchor(final ListItem<Entry<String, Entry<Class<?>, Object>>> categoryItem) {
        final String categoryName = categoryItem.getModelObject().getKey();
        final Anchor anchor = new Anchor("anchorName", categoryName);
        categoryItem.add(anchor);
      }
     
      private void addCategoryOptions(final ListItem<Entry<String, Entry<Class<?>, Object>>> categoryItem) {
        final DisplayOptionsMapPanel optionsPanel = new DisplayOptionsMapPanel("category");
View Full Code Here

Examples of org.apache.batik.gvt.TextNode.Anchor

     * Sets the anchor of this text node.
     * @param newAnchor the new anchor of this text node
     */
    public void setAnchor(Anchor newAnchor){
        invalidateGeometryCache();
        Anchor oldAnchor = anchor;
        this.anchor = newAnchor;
        firePropertyChange("anchor", oldAnchor, anchor);
    }
View Full Code Here

Examples of org.apache.sis.internal.jaxb.gmx.Anchor

                final XLink linkage = Context.resolver(context).anchor(context, value, key);
                if (linkage != null) {
                    if (linkage instanceof Anchor) {
                        value = (Anchor) linkage;
                    } else {
                        value = new Anchor(linkage, key);
                    }
                }
            }
        }
        /*
 
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.