예제 #1
0
  @Override
  public void show() {
    super.show();
    SE = new ArrayList<SelectorPanel>();
    for (TextSelectorClient TS : annotation.getTextSelectors()) {

      SelectorPanel SEE =
          new SelectorPanel(
              TS.getX().intValue(),
              TS.getY().intValue(),
              image.getAbsoluteLeft(),
              image.getAbsoluteTop(),
              TS.getWidth().intValue(),
              TS.getHeight().intValue());
      SEE.show();
      SE.add(SEE);
    }
  }
예제 #2
0
  @Override
  protected void continueDragging(MouseMoveEvent event) {

    super.continueDragging(event);
    if (SE != null)
      for (SelectorPanel SEE : SE) {
        SEE.hide();
      }
    SE = new ArrayList<SelectorPanel>();
    for (TextSelectorClient TS : annotation.getTextSelectors()) {

      SelectorPanel SEE =
          new SelectorPanel(
              TS.getX().intValue(),
              TS.getY().intValue(),
              image.getAbsoluteLeft(),
              image.getAbsoluteTop(),
              TS.getWidth().intValue(),
              TS.getHeight().intValue());
      SEE.show();
      SE.add(SEE);
    }
  }
예제 #3
0
  /** @wbp.parser.constructor */
  public VisualBookPanel(AnnotationClient annotationin, Image imagein) {
    super(false);

    Yo = this;

    annotation = annotationin;
    image = imagein;
    DockPanel SP = new DockPanel();

    setHTML(
        ActualState.getReadingActivityBook().getTitle()
            + "    -    "
            + ActualState.getLanguage().getPage()
            + ": "
            + annotation.getPageNumber());

    setWidget(SP);

    setWidget(SP);

    MenuBar menuBar = new MenuBar(false);
    SP.add(menuBar, DockPanel.NORTH);

    MenuItem mntmNewItem =
        new MenuItem(
            "New item",
            false,
            new Command() {
              public void execute() {
                Yo.hide();
              }
            });
    mntmNewItem.setHTML(ActualState.getLanguage().getClose());
    menuBar.addItem(mntmNewItem);

    MenuItem mntmNewItem_1 =
        new MenuItem(
            "New item",
            false,
            new Command() {
              public void execute() {
                Yo.hide();
                MainEntryPoint.setCurrentPageNumber(annotation.getPageNumber());
                MainEntryPoint.setFiltro(
                    Browser.getFiltroResidual(),
                    new ArrayList<UserClient>(),
                    new ArrayList<String>(),
                    new ArrayList<Long>());
                Controlador.change2Reader();
              }
            });
    mntmNewItem_1.setHTML(ActualState.getLanguage().getGO_To_Page());
    menuBar.addItem(mntmNewItem_1);

    //		MenuItem mntmShowSelection = new MenuItem(ActualUser.getLanguage().getComment_Area(), false,
    // new Command() {
    //			public void execute() {
    //				SE=new ArrayList<SelectorPanel>();
    //				for (TextSelectorClient TS : annotation.getTextSelectors()) {
    //
    //					SelectorPanel SEE = new SelectorPanel(TS.getX().intValue(),
    //							TS.getY().intValue(),
    //			                image.getAbsoluteLeft(), image.getAbsoluteTop(),
    //			                TS.getWidth().intValue(),
    //			                TS.getHeight().intValue());
    //			        SEE.show();
    //			        SE.add(SEE);
    //				}
    //			}
    //		});
    //	menuBar.addItem(mntmShowSelection);

    SP.add(image, DockPanel.SOUTH);

    image.addLoadHandler(
        new LoadHandler() {
          public void onLoad(LoadEvent event) {
            Image I = (Image) event.getSource();
            float He = I.getHeight();
            float Wi = I.getWidth();
            float prop = He / 830;
            float Winew = (Wi / prop);
            image.setSize(Winew + "px", "830px");
            // Window.alert("Altura: " + He + "Ancho: " + Wi );
          }
        });
  }