Exemple #1
0
  /**
   * Constructor.
   *
   * @param win parent window
   */
  public BaseXPassword(final Window win) {
    BaseXLayout.setWidth(this, BaseXTextField.DWIDTH);
    BaseXLayout.addInteraction(this, win);

    if (!(win instanceof BaseXDialog)) return;

    addKeyListener(((BaseXDialog) win).keys);
    addMouseListener(
        new MouseAdapter() {
          @Override
          public void mouseEntered(final MouseEvent e) {
            BaseXLayout.focus(e.getComponent());
          }
        });
  }
Exemple #2
0
  /**
   * Constructor.
   *
   * @param win parent reference
   * @param mouse mouse interaction
   */
  public BaseXMem(final Window win, final boolean mouse) {
    super(win);
    BaseXLayout.setWidth(this, DWIDTH);
    BaseXLayout.setHeight(this, getFont().getSize() + 6);
    if (mouse) {
      setCursor(CURSORHAND);
      addMouseListener(this);
      addMouseMotionListener(this);
    }

    final Thread t =
        new Thread() {
          @Override
          public void run() {
            repaint();
            Performance.sleep(500);
          }
        };
    t.setDaemon(true);
    t.start();
  }