示例#1
0
  @Override
  public void mousePressed(final MouseEvent e) {
    Performance.gc(3);
    repaint();

    final Runtime rt = Runtime.getRuntime();
    final long max = rt.maxMemory();
    final long total = rt.totalMemory();
    final long used = total - rt.freeMemory();

    final String inf =
        TOTAL_MEM_C
            + Performance.format(max, true)
            + NL
            + RESERVED_MEM_C
            + Performance.format(total, true)
            + NL
            + MEMUSED_C
            + Performance.format(used, true)
            + NL
            + NL
            + H_USED_MEM;

    BaseXDialog.info(gui, inf);
  }
示例#2
0
  /** Sorts text. */
  public final void sort() {
    final int caret = editor.pos();
    final DialogSort ds = new DialogSort(gui);
    if (!ds.ok() || !editor.sort()) return;

    hist.store(editor.text(), caret, editor.pos());
    scrollCode.invokeLater(true);
    repaint();
  }
示例#3
0
 @Override
 public void mousePressed(final MouseEvent e) {
   if (mem == null) mem = new DialogMem(gui);
   else mem.setVisible(true);
   repaint();
 }