Exemplo n.º 1
0
 public void componentResized(ComponentEvent e) {
   /* no importa que nos digan, el angulo inferior derecho del componente no se mueve! */
   Point location =
       new Point(Workspace.getInstance().getWidth(), Workspace.getInstance().getHeight());
   location.translate(
       -this.getWidth() - OFFSET_FROM_RIGHT, -this.getHeight() - OFFSET_FROM_BOTTOM);
   this.setLocation(location);
 }
Exemplo n.º 2
0
  private SourceCode() {
    this.setBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED));
    this.setLocation(OFFSET_FROM_RIGHT - MIN_WIDTH, OFFSET_FROM_BOTTOM - BUTTON_HEIGHT);
    this.setSize(new Dimension(MIN_WIDTH, MIN_HEIGHT));
    this.setPreferredSize(new Dimension(MIN_WIDTH, MIN_HEIGHT));

    this.setLayout(null);
    smallButtonFont = this.getFont().deriveFont(Font.PLAIN, 9.0f);

    this.enlarger = new SourceCodeEnlargerTimer();
    createHideCodeButton();
    createCompileButton();
    prepareCodeRegion();
    add(codeButton);
    add(compileButton);
    add(paneJavaCode.getWrappingContainerWithLines());

    Workspace.getInstance().addComponentListener(this);
  }