Class FlatTextEditDialog

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants

public class FlatTextEditDialog extends JDialog
A simple modal text edit undecorated dialog.

Exit with pressing ENTER or ESC.

See Also:
  • Method Details

    • getInstance

      public static FlatTextEditDialog getInstance()
    • setText

      public void setText(String text)
    • getText

      public String getText()
    • setTextNbColumns

      public void setTextNbColumns(int n)
      Set the dialog width so that n char 'm' can be displayed.
      Parameters:
      n -
    • setTextHorizontalAlignment

      public void setTextHorizontalAlignment(int alignment)
      Set the text alignment (left, centered, etc.)
      Parameters:
      alignment - The JTextField constants.
    • getTextHorizontalAlignment

      public int getTextHorizontalAlignment()
    • getTextBackground

      public Color getTextBackground()
    • setTextBackground

      public void setTextBackground(Color c)
    • setTextForeground

      public void setTextForeground(Color c)
    • getTextForeground

      public Color getTextForeground()
    • setTextFont

      public void setTextFont(Font f)
    • getTextFont

      public Font getTextFont()
    • isExitOk

      public boolean isExitOk()
      Returns:
      True if last exit was by pressing ENTER, false if ESC was pressed.
    • setPositionCenter

      public void setPositionCenter(JComponent c)
      Position this dialog centered relatively to specified component.
      Parameters:
      c -