Examples of Canvas


Examples of com.google.gwt.graphics.client.Canvas

  }

  public Element cloneRenderedCanvasElement() {
    ensureMasterIsRendered();
    int width = (int) (rootEvent.getDuration() * domainToPixels);
    final Canvas canvas = new Canvas(width, COORD_HEIGHT);
    canvas.setLineWidth(2);
    final Element element = canvas.getElement();
    element.setClassName(resources.eventTraceBreakdownCss().masterRender());
    element.getStyle().setPropertyPx("width", width);
    new Renderer(canvas, rootEvent).renderSelfAndChildren();
    return element;
  }
View Full Code Here

Examples of com.jagpdf.Canvas

    static void strings(String[] args)
    {
        Document doc = jagpdf.create_file(args[0] + "/jagpdf_doc_java_strings.pdf");
        doc.page_start(597.6, 848.68);
        Canvas canvas = doc.page().canvas();

        //[java_example_string
        /*` An example should make it clear. Let's load a standard ISO-8859-2
            encoded font. */
        Font helv = doc.font_load("standard; enc=iso-8859-2; name=Helvetica; size=24");
        canvas.text_font(helv);
        /*` One of the languages representable by this encoding is Czech. We can
          pass a Unicode string ['úplněk] (full moon). [lib] converts the string
          to ISO-8859-2 and it is shown correctly. */
        String full_moon_cze = "\u00fapln\u011bk";
        canvas.text(50, 800, full_moon_cze); // ok
        /*` If we pass Swedish ['fullmåne], letter ['å] will not be shown
         because ISO-8859-2 does not represent such character. We should have
         used ISO-8859-1 encoded font instead. */
        String full_moon_swe = "fullm\u00e5ne";
        canvas.text(50, 760, full_moon_swe); // wrong
        /*` Let's load a Unicode encoded TrueType font. */
        //<-
        /* //->
        Font dejavu = doc.font_load("enc=utf-8; file=DejaVuSans.ttf; size=24");
        //<- */
        String res_dir = testlib.getResourcesDir();
        String dejavu_file = res_dir + "/fonts/DejaVuSans.ttf";
        Font dejavu = doc.font_load("enc=utf-8; file=" + dejavu_file + "; size=24");
        //->
        canvas.text_font(dejavu);
        /*` Now we can mix Czech and Swedish and it will be shown correctly as
            [lib] converts the strings to UTF-8.*/
        canvas.text(50, 720, full_moon_swe);
        canvas.text(50, 680, full_moon_cze);
        //]

        doc.page_end();
        doc.finalize_doc();
    }
View Full Code Here

Examples of com.opera.core.systems.model.Canvas

  public Canvas canvas;

  @Test
  public void construction() {
    canvas = new Canvas();

    assertEquals(0, canvas.getX());
    assertEquals(0, canvas.getY());
    assertEquals(0, canvas.getWidth());
    assertEquals(0, canvas.getHeight());
View Full Code Here

Examples of com.smartgwt.client.widgets.Canvas

  /**
   * Hide the open panel again - no matter which one is open. If no panel is open than nothing will happen.
   */
  public void hidePanel() {
    Canvas panel = getOpenPanel();
    if (panel != null) {
      panel.setVisible(false);
      panelLayout.setVisible(false);
      gridButton.setSelected(false);
      searchButton.setSelected(false);
      closeBtn.setVisible(false);
      setHeight(52);
View Full Code Here

Examples of com.smartgwt.client.widgets.Canvas

  /**
   * Hide the open panel again - no matter which one is open. If no panel is open than nothing will happen.
   */
  public void hidePanel() {
    Canvas panel = getOpenPanel();
    if (panel != null) {
      panel.setVisible(false);
      panelLayout.setVisible(false);
      gridButton.setSelected(false);
      searchButton.setSelected(false);
      closeBtn.setVisible(false);
      setHeight(52);
View Full Code Here

Examples of com.smartgwt.client.widgets.Canvas

   * @param key key associated to the card that should be shown
   * @since 1.0.0
   */
  @Api
  public void showCard(KEY_TYPE key) {
    Canvas newCurrent = cards.get(key);
    if (null != newCurrent) {
      if (newCurrent != currentCard && null != currentCard) {
        currentCard.hide();
      }
      currentCard = newCurrent;
View Full Code Here

Examples of com.smartgwt.client.widgets.Canvas

    layerTransparencyUnderlay.setImageType(ImageStyle.NORMAL);

    // ----------------------------------------------------------

    if (vectorLayer != null) {
      Canvas sampleMap = new Canvas();
      sampleMap.setAutoHeight();
      sampleMap.setAutoWidth();
      // sampleMap.setSize("89px", "89px");
      sampleMap.addChild(layerImg);
      sampleMap.addChild(layerLabelOverlay);

      labels = new CheckboxItem();
      initLabels();

      DynamicForm  form = new DynamicForm();
      form.setTitleOrientation(TitleOrientation.TOP);
      form.setHeight(40);
      form.setFields(labels);

      layout.addMember(sampleMap);
      layout.addMember(form);

    } else {
      Canvas sampleMap = new Canvas();
      sampleMap.setAutoHeight();
      sampleMap.setAutoWidth();
      // sampleMap.setSize("89px", "89px");
      layerImg.setUseOpacityFilter(true);
      sampleMap.addChild(layerTransparencyUnderlay);
      sampleMap.addChild(layerImg);

      transparencySlider = new Slider(messages.layerActionsOpacity());
      String raw = rasterLayer.getLayerInfo().getStyle();
      double opacity = 1d;
      if (raw != null && !"".equals(raw)) {
View Full Code Here

Examples of com.smartgwt.client.widgets.Canvas

    layout.addMember(createLayerInfo(layer));

    if (layer instanceof VectorLayer) {
      layout.addMember(createFeatureInfo((VectorLayer) layer));
    } else {
      Canvas c = createLegendInfo((RasterLayer) layer);
      if (c != null) {
        layout.addMember(c);
      }
    }
View Full Code Here

Examples of com.smartgwt.client.widgets.Canvas

    ClientLayerTreeInfo layerTreeInfo = mapModel.getMapInfo().getLayerTree();
    if (layerTreeInfo != null) {
      for (ClientToolInfo tool : layerTreeInfo.getTools()) {
        String id = tool.getId();
        Canvas button = null;
        ToolbarBaseAction action = LayerTreeRegistry.getToolbarAction(id, mapWidget);
        if (action instanceof ToolbarWidget) {
          toolStrip.addMember(((ToolbarWidget) action).getWidget());
        } else if (action instanceof ToolbarCanvas) {
          button = ((ToolbarCanvas) action).getCanvas();
View Full Code Here

Examples of com.smartgwt.client.widgets.Canvas

      descriptionWindow.setHeaderIcon("[ISOMORPHIC]/geomajas/geomajas_desktopicon_small.png", 16, 16);
      descriptionWindow.setShowEdges(true);
      descriptionWindow.setKeepInParentRect(true);
      descriptionWindow.setHeaderControls(HeaderControls.HEADER_ICON, HeaderControls.HEADER_LABEL);

      Canvas contents = new Canvas();
      contents.setCanSelectText(true);
      contents.setPadding(5);
      contents.setContents(description);
      contents.setDefaultWidth(200);

      descriptionWindow.setAutoSize(true);
      descriptionWindow.setAutoHeight();
      descriptionWindow.addItem(contents);
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.