A test app for the runtime adjustment stuff.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1016 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -0,0 +1,50 @@
|
|||||||
|
//
|
||||||
|
// $Id: AdjustTestApp.java,v 1.1 2003/01/15 00:47:06 mdb Exp $
|
||||||
|
|
||||||
|
package com.samskivert.util;
|
||||||
|
|
||||||
|
import java.awt.BorderLayout;
|
||||||
|
import javax.swing.BorderFactory;
|
||||||
|
import javax.swing.JComponent;
|
||||||
|
import javax.swing.JFrame;
|
||||||
|
import javax.swing.JPanel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Does something extraordinary.
|
||||||
|
*/
|
||||||
|
public class AdjustTestApp
|
||||||
|
{
|
||||||
|
public static void main (String[] args)
|
||||||
|
{
|
||||||
|
Config config = new Config("test");
|
||||||
|
new RuntimeAdjust.IntAdjust(
|
||||||
|
"This is a test adjustment. It is nice.",
|
||||||
|
"samskivert.test.int_adjust1", config, 5);
|
||||||
|
new RuntimeAdjust.IntAdjust(
|
||||||
|
"This is another test adjustment. It is nice.",
|
||||||
|
"samskivert.thwack.int_adjust2", config, 15);
|
||||||
|
new RuntimeAdjust.BooleanAdjust(
|
||||||
|
"This is a test adjustment. It is nice.",
|
||||||
|
"samskivert.thwack.boolean_adjust1", config, true);
|
||||||
|
|
||||||
|
new RuntimeAdjust.IntAdjust(
|
||||||
|
"This is an other test adjustment. It is nice.",
|
||||||
|
"otherpackage.test.int_adjust2", config, 15);
|
||||||
|
new RuntimeAdjust.BooleanAdjust(
|
||||||
|
"This is a an other test adjustment. It is nice.",
|
||||||
|
"otherpackage.test.boolean_adjust1", config, false);
|
||||||
|
new RuntimeAdjust.EnumAdjust(
|
||||||
|
"This is yet an other test adjustment.",
|
||||||
|
"otherpackage.test.enum_adjust1", config,
|
||||||
|
new String[] { "debug", "info", "warning" }, "info");
|
||||||
|
|
||||||
|
JPanel editor = RuntimeAdjust.createAdjustEditor();
|
||||||
|
JFrame frame = new JFrame();
|
||||||
|
((JComponent)frame.getContentPane()).setBorder(
|
||||||
|
BorderFactory.createEmptyBorder(5, 5, 5, 5));
|
||||||
|
frame.getContentPane().add(editor, BorderLayout.CENTER);
|
||||||
|
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||||
|
frame.pack();
|
||||||
|
frame.show();
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user