コード例 #1
0
ファイル: App.java プロジェクト: born2snipe/regex-tool
public class App extends JFrame {
  private PatternPanel patternPanel = new PatternPanel(PatternChangedManager.instance());
  private DataPanel dataPanel = new DataPanel(DataChangedManager.instance());
  private ResultPanel resultPanel = new ResultPanel(ResultsChangedManager.instance());
  private MatchResolver matchResolver = new MatchResolver();

  public App() {
    super("Regex Tool");
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    setLocationByPlatform(true);
    getContentPane().setLayout(new BorderLayout());
    getContentPane().add(patternPanel, BorderLayout.NORTH);
    final JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, dataPanel, resultPanel);
    splitPane.setDividerLocation(200);
    getContentPane().add(splitPane, BorderLayout.CENTER);
    setSize(800, 480);

    PatternChangedManager.instance().addListener(matchResolver);
    DataChangedManager.instance().addHandler(matchResolver);
  }

  public static void main(String[] args) throws Exception {
    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
    SwingUtilities.invokeLater(
        new Runnable() {
          public void run() {
            new App().setVisible(true);
          }
        });
  }
}
コード例 #2
0
ファイル: App.java プロジェクト: born2snipe/regex-tool
  public App() {
    super("Regex Tool");
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    setLocationByPlatform(true);
    getContentPane().setLayout(new BorderLayout());
    getContentPane().add(patternPanel, BorderLayout.NORTH);
    final JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, dataPanel, resultPanel);
    splitPane.setDividerLocation(200);
    getContentPane().add(splitPane, BorderLayout.CENTER);
    setSize(800, 480);

    PatternChangedManager.instance().addListener(matchResolver);
    DataChangedManager.instance().addHandler(matchResolver);
  }