clevic 0.12.0 → 0.13.0.b1
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +10 -0
- data/Manifest.txt +209 -30
- data/README.txt +16 -20
- data/Rakefile +8 -8
- data/TODO +6 -7
- data/bin/clevic +12 -73
- data/lib/clevic/action_builder.rb +168 -0
- data/lib/clevic/ar_methods.rb +120 -0
- data/lib/clevic/attribute_list.rb +56 -0
- data/lib/clevic/cache_table.rb +60 -37
- data/lib/clevic/default_view.rb +3 -16
- data/lib/clevic/delegate.rb +46 -0
- data/lib/clevic/emitter.rb +38 -0
- data/lib/clevic/extensions.rb +61 -114
- data/lib/clevic/field.rb +159 -228
- data/lib/clevic/field_valuer.rb +165 -0
- data/lib/clevic/filter_command.rb +2 -6
- data/lib/clevic/generic_format.rb +52 -0
- data/lib/clevic/{ui → icons}/icon.png +0 -0
- data/lib/clevic/many_field.rb +7 -0
- data/lib/clevic/model_builder.rb +234 -146
- data/lib/clevic/model_column.rb +61 -13
- data/lib/clevic/order_attribute.rb +10 -0
- data/lib/clevic/qt.rb +35 -0
- data/lib/clevic/qt/action_builder.rb +47 -0
- data/lib/clevic/qt/boolean_delegate.rb +8 -0
- data/lib/clevic/{browser.rb → qt/browser.rb} +35 -14
- data/lib/clevic/qt/clipboard.rb +35 -0
- data/lib/clevic/qt/combo_delegate.rb +198 -0
- data/lib/clevic/qt/delegates.rb +1 -0
- data/lib/clevic/qt/distinct_delegate.rb +35 -0
- data/lib/clevic/qt/extensions.rb +52 -0
- data/lib/clevic/qt/field.rb +18 -0
- data/lib/clevic/{item_delegate.rb → qt/item_delegate.rb} +8 -4
- data/lib/clevic/qt/relational_delegate.rb +87 -0
- data/lib/clevic/{search_dialog.rb → qt/search_dialog.rb} +1 -11
- data/lib/clevic/qt/set_delegate.rb +44 -0
- data/lib/clevic/qt/table_model.rb +331 -0
- data/lib/clevic/qt/table_view.rb +344 -0
- data/lib/clevic/qt/text_area_delegate.rb +8 -0
- data/lib/clevic/{text_delegate.rb → qt/text_delegate.rb} +6 -4
- data/lib/clevic/{ui → qt/ui}/.gitignore +0 -0
- data/lib/clevic/{ui → qt/ui}/browser.ui +0 -0
- data/lib/clevic/{ui → qt/ui}/search_dialog.ui +0 -0
- data/lib/clevic/rails_models_loaders.rb +56 -0
- data/lib/clevic/record.rb +2 -17
- data/lib/clevic/sampler.rb +81 -0
- data/lib/clevic/sequel_ar_adapter.rb +215 -0
- data/lib/clevic/sequel_length_validation.rb +23 -0
- data/lib/clevic/sequel_meta.rb +65 -0
- data/lib/clevic/sequel_naked.rb +30 -0
- data/lib/clevic/swing.rb +38 -0
- data/lib/clevic/swing/action.rb +125 -0
- data/lib/clevic/swing/action_builder.rb +47 -0
- data/lib/clevic/swing/boolean_delegate.rb +26 -0
- data/lib/clevic/swing/browser.rb +282 -0
- data/lib/clevic/swing/cell_editor.rb +95 -0
- data/lib/clevic/swing/cell_renderer.rb +44 -0
- data/lib/clevic/swing/clipboard.rb +135 -0
- data/lib/clevic/swing/combo_delegate.rb +336 -0
- data/lib/clevic/swing/confirm_dialog.rb +57 -0
- data/lib/clevic/swing/delegate.rb +40 -0
- data/lib/clevic/swing/distinct_delegate.rb +30 -0
- data/lib/clevic/swing/extensions.rb +274 -0
- data/lib/clevic/swing/field.rb +35 -0
- data/lib/clevic/swing/relational_delegate.rb +48 -0
- data/lib/clevic/swing/row_header.rb +210 -0
- data/lib/clevic/swing/search_dialog.rb +230 -0
- data/lib/clevic/swing/selection_model.rb +90 -0
- data/lib/clevic/swing/set_delegate.rb +41 -0
- data/lib/clevic/swing/swing_table_index.rb +43 -0
- data/lib/clevic/swing/table_model.rb +200 -0
- data/lib/clevic/swing/table_view.rb +385 -0
- data/lib/clevic/swing/table_view_focus.rb +47 -0
- data/lib/clevic/swing/tag_delegate.rb +127 -0
- data/lib/clevic/swing/tag_editor.rb +101 -0
- data/lib/clevic/swing/text_area_delegate.rb +46 -0
- data/lib/clevic/swing/text_delegate.rb +31 -0
- data/lib/clevic/swing/ui/build.xml +74 -0
- data/lib/clevic/swing/ui/dist/README.TXT +33 -0
- data/lib/clevic/swing/ui/dist/lib/swing-layout-1.0.3.jar +0 -0
- data/lib/clevic/swing/ui/manifest.mf +3 -0
- data/lib/clevic/swing/ui/nbproject/build-impl.xml +731 -0
- data/lib/clevic/swing/ui/nbproject/genfiles.properties +8 -0
- data/lib/clevic/swing/ui/nbproject/private/config.properties +0 -0
- data/lib/clevic/swing/ui/nbproject/private/private.properties +6 -0
- data/lib/clevic/swing/ui/nbproject/private/private.xml +4 -0
- data/lib/clevic/swing/ui/nbproject/project.properties +70 -0
- data/lib/clevic/swing/ui/nbproject/project.xml +14 -0
- data/lib/clevic/swing/ui/src/SearchDialog.form +158 -0
- data/lib/clevic/swing/ui/src/SearchDialog.java +163 -0
- data/lib/clevic/swing/ui/src/TagEditor.form +106 -0
- data/lib/clevic/swing/ui/src/TagEditor.java +108 -0
- data/lib/clevic/swing/ui/src/resources/SearchDialog.properties +0 -0
- data/lib/clevic/table_index.rb +100 -0
- data/lib/clevic/table_model.rb +54 -425
- data/lib/clevic/table_searcher.rb +113 -116
- data/lib/clevic/table_view.rb +171 -399
- data/lib/clevic/table_view_paste.rb +199 -0
- data/lib/clevic/version.rb +3 -2
- data/lib/clevic/view.rb +94 -43
- data/models/accounts_models.rb +13 -13
- data/models/minimal_models.rb +5 -9
- data/models/times_models.rb +19 -14
- data/models/times_psql_models.rb +10 -0
- data/models/times_sqlite_models.rb +1 -8
- data/models/values_models.rb +2 -8
- data/tasks/clevic.rake +1 -1
- data/tasks/rdoc.rake +1 -5
- data/tasks/website.rake +1 -1
- data/test/test_cache_table.rb +15 -29
- data/test/test_helper.rb +14 -83
- data/test/test_order_attribute.rb +1 -1
- data/test/test_table_model.rb +0 -21
- data/test/test_table_searcher.rb +67 -61
- metadata +262 -78
- data/lib/clevic.rb +0 -4
- data/lib/clevic/db_options.rb +0 -112
- data/lib/clevic/delegates.rb +0 -386
@@ -0,0 +1,8 @@
|
|
1
|
+
build.xml.data.CRC32=529c0bd1
|
2
|
+
build.xml.script.CRC32=3ab1a0a6
|
3
|
+
build.xml.stylesheet.CRC32=958a1d3e@1.26.2.45
|
4
|
+
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
|
5
|
+
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
|
6
|
+
nbproject/build-impl.xml.data.CRC32=529c0bd1
|
7
|
+
nbproject/build-impl.xml.script.CRC32=e38c7cce
|
8
|
+
nbproject/build-impl.xml.stylesheet.CRC32=5c621a33@1.26.2.45
|
File without changes
|
@@ -0,0 +1,70 @@
|
|
1
|
+
application.title=ui
|
2
|
+
application.vendor=panic
|
3
|
+
build.classes.dir=${build.dir}/classes
|
4
|
+
build.classes.excludes=**/*.java,**/*.form
|
5
|
+
# This directory is removed when the project is cleaned:
|
6
|
+
build.dir=build
|
7
|
+
build.generated.dir=${build.dir}/generated
|
8
|
+
build.generated.sources.dir=${build.dir}/generated-sources
|
9
|
+
# Only compile against the classpath explicitly listed here:
|
10
|
+
build.sysclasspath=ignore
|
11
|
+
build.test.classes.dir=${build.dir}/test/classes
|
12
|
+
build.test.results.dir=${build.dir}/test/results
|
13
|
+
# Uncomment to specify the preferred debugger connection transport:
|
14
|
+
#debug.transport=dt_socket
|
15
|
+
debug.classpath=\
|
16
|
+
${run.classpath}
|
17
|
+
debug.test.classpath=\
|
18
|
+
${run.test.classpath}
|
19
|
+
# This directory is removed when the project is cleaned:
|
20
|
+
dist.dir=dist
|
21
|
+
dist.jar=${dist.dir}/ui.jar
|
22
|
+
dist.javadoc.dir=${dist.dir}/javadoc
|
23
|
+
excludes=
|
24
|
+
includes=**
|
25
|
+
jar.compress=false
|
26
|
+
javac.classpath=\
|
27
|
+
${libs.swing-layout.classpath}
|
28
|
+
# Space-separated list of extra javac options
|
29
|
+
javac.compilerargs=
|
30
|
+
javac.deprecation=false
|
31
|
+
javac.source=1.5
|
32
|
+
javac.target=1.5
|
33
|
+
javac.test.classpath=\
|
34
|
+
${javac.classpath}:\
|
35
|
+
${build.classes.dir}:\
|
36
|
+
${libs.junit.classpath}:\
|
37
|
+
${libs.junit_4.classpath}
|
38
|
+
javadoc.additionalparam=
|
39
|
+
javadoc.author=false
|
40
|
+
javadoc.encoding=${source.encoding}
|
41
|
+
javadoc.noindex=false
|
42
|
+
javadoc.nonavbar=false
|
43
|
+
javadoc.notree=false
|
44
|
+
javadoc.private=false
|
45
|
+
javadoc.splitindex=true
|
46
|
+
javadoc.use=true
|
47
|
+
javadoc.version=false
|
48
|
+
javadoc.windowtitle=
|
49
|
+
jnlp.codebase.type=local
|
50
|
+
jnlp.codebase.url=file:/home/panic/projects/clevic-sequel/lib/clevic/swing/ui/dist/
|
51
|
+
jnlp.descriptor=application
|
52
|
+
jnlp.enabled=false
|
53
|
+
jnlp.offline-allowed=false
|
54
|
+
jnlp.signed=false
|
55
|
+
main.class=SearchDialog
|
56
|
+
manifest.file=manifest.mf
|
57
|
+
meta.inf.dir=${src.dir}/META-INF
|
58
|
+
platform.active=JDK_1.5
|
59
|
+
run.classpath=\
|
60
|
+
${javac.classpath}:\
|
61
|
+
${build.classes.dir}
|
62
|
+
# Space-separated list of JVM arguments used when running the project
|
63
|
+
# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
|
64
|
+
# or test-sys-prop.name=value to set system properties for unit tests):
|
65
|
+
run.jvmargs=
|
66
|
+
run.test.classpath=\
|
67
|
+
${javac.test.classpath}:\
|
68
|
+
${build.test.classes.dir}
|
69
|
+
source.encoding=UTF-8
|
70
|
+
src.dir=src
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<project xmlns="http://www.netbeans.org/ns/project/1">
|
3
|
+
<type>org.netbeans.modules.java.j2seproject</type>
|
4
|
+
<configuration>
|
5
|
+
<data xmlns="http://www.netbeans.org/ns/j2se-project/3">
|
6
|
+
<name>ui</name>
|
7
|
+
<explicit-platform explicit-source-supported="true"/>
|
8
|
+
<source-roots>
|
9
|
+
<root id="src.dir"/>
|
10
|
+
</source-roots>
|
11
|
+
<test-roots/>
|
12
|
+
</data>
|
13
|
+
</configuration>
|
14
|
+
</project>
|
@@ -0,0 +1,158 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" ?>
|
2
|
+
|
3
|
+
<Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JDialogFormInfo">
|
4
|
+
<NonVisualComponents>
|
5
|
+
<Component class="javax.swing.ButtonGroup" name="direction_button_group">
|
6
|
+
</Component>
|
7
|
+
</NonVisualComponents>
|
8
|
+
<Properties>
|
9
|
+
<Property name="font" type="java.awt.Font" noResource="true" editor="org.netbeans.beaninfo.editors.FontEditor">
|
10
|
+
<Font name="Tahoma" size="12" style="0"/>
|
11
|
+
</Property>
|
12
|
+
<Property name="name" type="java.lang.String" value="SearchDialog" noResource="true"/>
|
13
|
+
</Properties>
|
14
|
+
<SyntheticProperties>
|
15
|
+
<SyntheticProperty name="formSizePolicy" type="int" value="2"/>
|
16
|
+
</SyntheticProperties>
|
17
|
+
<AuxValues>
|
18
|
+
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="2"/>
|
19
|
+
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="true"/>
|
20
|
+
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
21
|
+
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
|
22
|
+
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
|
23
|
+
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="2"/>
|
24
|
+
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
25
|
+
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
26
|
+
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="1"/>
|
27
|
+
</AuxValues>
|
28
|
+
|
29
|
+
<Layout>
|
30
|
+
<DimensionLayout dim="0">
|
31
|
+
<Group type="103" groupAlignment="0" attributes="0">
|
32
|
+
<Group type="102" alignment="0" attributes="0">
|
33
|
+
<EmptySpace max="-2" attributes="0"/>
|
34
|
+
<Group type="103" groupAlignment="0" attributes="0">
|
35
|
+
<Group type="102" alignment="0" attributes="0">
|
36
|
+
<EmptySpace min="-2" pref="21" max="-2" attributes="0"/>
|
37
|
+
<Component id="search_label" min="-2" max="-2" attributes="0"/>
|
38
|
+
<EmptySpace max="-2" attributes="0"/>
|
39
|
+
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
40
|
+
<Component id="search_combo" alignment="0" pref="192" max="32767" attributes="1"/>
|
41
|
+
<Component id="from_start" alignment="0" max="32767" attributes="1"/>
|
42
|
+
<Component id="regex" alignment="0" max="32767" attributes="1"/>
|
43
|
+
<Component id="whole_words" alignment="0" max="32767" attributes="1"/>
|
44
|
+
<Component id="forwards" alignment="0" max="32767" attributes="1"/>
|
45
|
+
<Component id="backwards" alignment="0" min="-2" max="-2" attributes="1"/>
|
46
|
+
</Group>
|
47
|
+
</Group>
|
48
|
+
<Group type="102" alignment="0" attributes="0">
|
49
|
+
<Component id="ok_button" min="-2" max="-2" attributes="0"/>
|
50
|
+
<EmptySpace pref="160" max="32767" attributes="0"/>
|
51
|
+
<Component id="cancel_button" min="-2" max="-2" attributes="0"/>
|
52
|
+
</Group>
|
53
|
+
</Group>
|
54
|
+
<EmptySpace min="-2" pref="16" max="-2" attributes="0"/>
|
55
|
+
</Group>
|
56
|
+
</Group>
|
57
|
+
</DimensionLayout>
|
58
|
+
<DimensionLayout dim="1">
|
59
|
+
<Group type="103" groupAlignment="0" attributes="0">
|
60
|
+
<Group type="102" alignment="1" attributes="0">
|
61
|
+
<EmptySpace pref="23" max="32767" attributes="0"/>
|
62
|
+
<Group type="103" groupAlignment="3" attributes="0">
|
63
|
+
<Component id="search_combo" alignment="3" min="-2" max="-2" attributes="0"/>
|
64
|
+
<Component id="search_label" alignment="3" min="-2" max="-2" attributes="0"/>
|
65
|
+
</Group>
|
66
|
+
<EmptySpace type="separate" max="-2" attributes="0"/>
|
67
|
+
<Component id="from_start" min="-2" max="-2" attributes="0"/>
|
68
|
+
<EmptySpace max="-2" attributes="0"/>
|
69
|
+
<Component id="regex" min="-2" max="-2" attributes="0"/>
|
70
|
+
<EmptySpace max="-2" attributes="0"/>
|
71
|
+
<Component id="whole_words" min="-2" max="-2" attributes="0"/>
|
72
|
+
<EmptySpace type="separate" max="-2" attributes="0"/>
|
73
|
+
<Component id="forwards" min="-2" max="-2" attributes="0"/>
|
74
|
+
<EmptySpace max="-2" attributes="0"/>
|
75
|
+
<Component id="backwards" min="-2" max="-2" attributes="0"/>
|
76
|
+
<EmptySpace type="separate" max="-2" attributes="0"/>
|
77
|
+
<Group type="103" groupAlignment="3" attributes="0">
|
78
|
+
<Component id="ok_button" alignment="3" min="-2" max="-2" attributes="0"/>
|
79
|
+
<Component id="cancel_button" alignment="3" min="-2" max="-2" attributes="0"/>
|
80
|
+
</Group>
|
81
|
+
<EmptySpace min="-2" pref="20" max="-2" attributes="0"/>
|
82
|
+
</Group>
|
83
|
+
</Group>
|
84
|
+
</DimensionLayout>
|
85
|
+
</Layout>
|
86
|
+
<SubComponents>
|
87
|
+
<Component class="javax.swing.JLabel" name="search_label">
|
88
|
+
<Properties>
|
89
|
+
<Property name="text" type="java.lang.String" value="Search" noResource="true"/>
|
90
|
+
<Property name="name" type="java.lang.String" value="search_label" noResource="true"/>
|
91
|
+
</Properties>
|
92
|
+
</Component>
|
93
|
+
<Component class="javax.swing.JComboBox" name="search_combo">
|
94
|
+
<Properties>
|
95
|
+
<Property name="editable" type="boolean" value="true"/>
|
96
|
+
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
|
97
|
+
<StringArray count="0"/>
|
98
|
+
</Property>
|
99
|
+
<Property name="name" type="java.lang.String" value="search_combo" noResource="true"/>
|
100
|
+
</Properties>
|
101
|
+
</Component>
|
102
|
+
<Component class="javax.swing.JCheckBox" name="from_start">
|
103
|
+
<Properties>
|
104
|
+
<Property name="mnemonic" type="int" value="70"/>
|
105
|
+
<Property name="text" type="java.lang.String" value="From Start" noResource="true"/>
|
106
|
+
<Property name="name" type="java.lang.String" value="from_start" noResource="true"/>
|
107
|
+
</Properties>
|
108
|
+
</Component>
|
109
|
+
<Component class="javax.swing.JCheckBox" name="regex">
|
110
|
+
<Properties>
|
111
|
+
<Property name="mnemonic" type="int" value="82"/>
|
112
|
+
<Property name="text" type="java.lang.String" value="Regular Expression" noResource="true"/>
|
113
|
+
<Property name="name" type="java.lang.String" value="regex" noResource="true"/>
|
114
|
+
</Properties>
|
115
|
+
</Component>
|
116
|
+
<Component class="javax.swing.JCheckBox" name="whole_words">
|
117
|
+
<Properties>
|
118
|
+
<Property name="mnemonic" type="int" value="87"/>
|
119
|
+
<Property name="text" type="java.lang.String" value="Whole words" noResource="true"/>
|
120
|
+
<Property name="name" type="java.lang.String" value="whole_words" noResource="true"/>
|
121
|
+
</Properties>
|
122
|
+
</Component>
|
123
|
+
<Component class="javax.swing.JRadioButton" name="forwards">
|
124
|
+
<Properties>
|
125
|
+
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
|
126
|
+
<ComponentRef name="direction_button_group"/>
|
127
|
+
</Property>
|
128
|
+
<Property name="mnemonic" type="int" value="70"/>
|
129
|
+
<Property name="text" type="java.lang.String" value="Forwards" noResource="true"/>
|
130
|
+
<Property name="name" type="java.lang.String" value="forwards" noResource="true"/>
|
131
|
+
</Properties>
|
132
|
+
</Component>
|
133
|
+
<Component class="javax.swing.JRadioButton" name="backwards">
|
134
|
+
<Properties>
|
135
|
+
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
|
136
|
+
<ComponentRef name="direction_button_group"/>
|
137
|
+
</Property>
|
138
|
+
<Property name="mnemonic" type="int" value="66"/>
|
139
|
+
<Property name="text" type="java.lang.String" value="Backwards" noResource="true"/>
|
140
|
+
<Property name="name" type="java.lang.String" value="backwards" noResource="true"/>
|
141
|
+
</Properties>
|
142
|
+
</Component>
|
143
|
+
<Component class="javax.swing.JButton" name="ok_button">
|
144
|
+
<Properties>
|
145
|
+
<Property name="mnemonic" type="int" value="79"/>
|
146
|
+
<Property name="text" type="java.lang.String" value="OK" noResource="true"/>
|
147
|
+
<Property name="name" type="java.lang.String" value="ok_button" noResource="true"/>
|
148
|
+
</Properties>
|
149
|
+
</Component>
|
150
|
+
<Component class="javax.swing.JButton" name="cancel_button">
|
151
|
+
<Properties>
|
152
|
+
<Property name="mnemonic" type="int" value="67"/>
|
153
|
+
<Property name="text" type="java.lang.String" value="Cancel" noResource="true"/>
|
154
|
+
<Property name="name" type="java.lang.String" value="cancel_button" noResource="true"/>
|
155
|
+
</Properties>
|
156
|
+
</Component>
|
157
|
+
</SubComponents>
|
158
|
+
</Form>
|
@@ -0,0 +1,163 @@
|
|
1
|
+
/*
|
2
|
+
* To change this template, choose Tools | Templates
|
3
|
+
* and open the template in the editor.
|
4
|
+
*/
|
5
|
+
|
6
|
+
/*
|
7
|
+
* SearchDialog.java
|
8
|
+
*
|
9
|
+
* Created on Jul 31, 2010, 1:51:54 PM
|
10
|
+
*/
|
11
|
+
|
12
|
+
/**
|
13
|
+
*
|
14
|
+
* @author panic
|
15
|
+
*/
|
16
|
+
public class SearchDialog extends javax.swing.JDialog {
|
17
|
+
|
18
|
+
/** Creates new form SearchDialog */
|
19
|
+
public SearchDialog(java.awt.Frame parent, boolean modal) {
|
20
|
+
super(parent, modal);
|
21
|
+
initComponents();
|
22
|
+
}
|
23
|
+
|
24
|
+
/** This method is called from within the constructor to
|
25
|
+
* initialize the form.
|
26
|
+
* WARNING: Do NOT modify this code. The content of this method is
|
27
|
+
* always regenerated by the Form Editor.
|
28
|
+
*/
|
29
|
+
@SuppressWarnings("unchecked")
|
30
|
+
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
31
|
+
private void initComponents() {
|
32
|
+
|
33
|
+
direction_button_group = new javax.swing.ButtonGroup();
|
34
|
+
search_label = new javax.swing.JLabel();
|
35
|
+
search_combo = new javax.swing.JComboBox();
|
36
|
+
from_start = new javax.swing.JCheckBox();
|
37
|
+
regex = new javax.swing.JCheckBox();
|
38
|
+
whole_words = new javax.swing.JCheckBox();
|
39
|
+
forwards = new javax.swing.JRadioButton();
|
40
|
+
backwards = new javax.swing.JRadioButton();
|
41
|
+
ok_button = new javax.swing.JButton();
|
42
|
+
cancel_button = new javax.swing.JButton();
|
43
|
+
|
44
|
+
setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
|
45
|
+
setName("SearchDialog"); // NOI18N
|
46
|
+
|
47
|
+
search_label.setText("Search"); // NOI18N
|
48
|
+
search_label.setName("search_label"); // NOI18N
|
49
|
+
|
50
|
+
search_combo.setEditable(true);
|
51
|
+
search_combo.setName("search_combo"); // NOI18N
|
52
|
+
|
53
|
+
from_start.setMnemonic('F');
|
54
|
+
from_start.setText("From Start"); // NOI18N
|
55
|
+
from_start.setName("from_start"); // NOI18N
|
56
|
+
|
57
|
+
regex.setMnemonic('R');
|
58
|
+
regex.setText("Regular Expression"); // NOI18N
|
59
|
+
regex.setName("regex"); // NOI18N
|
60
|
+
|
61
|
+
whole_words.setMnemonic('W');
|
62
|
+
whole_words.setText("Whole words"); // NOI18N
|
63
|
+
whole_words.setName("whole_words"); // NOI18N
|
64
|
+
|
65
|
+
direction_button_group.add(forwards);
|
66
|
+
forwards.setMnemonic('F');
|
67
|
+
forwards.setText("Forwards"); // NOI18N
|
68
|
+
forwards.setName("forwards"); // NOI18N
|
69
|
+
|
70
|
+
direction_button_group.add(backwards);
|
71
|
+
backwards.setMnemonic('B');
|
72
|
+
backwards.setText("Backwards"); // NOI18N
|
73
|
+
backwards.setName("backwards"); // NOI18N
|
74
|
+
|
75
|
+
ok_button.setMnemonic('O');
|
76
|
+
ok_button.setText("OK"); // NOI18N
|
77
|
+
ok_button.setName("ok_button"); // NOI18N
|
78
|
+
|
79
|
+
cancel_button.setMnemonic('C');
|
80
|
+
cancel_button.setText("Cancel"); // NOI18N
|
81
|
+
cancel_button.setName("cancel_button"); // NOI18N
|
82
|
+
|
83
|
+
org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
|
84
|
+
getContentPane().setLayout(layout);
|
85
|
+
layout.setHorizontalGroup(
|
86
|
+
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
|
87
|
+
.add(layout.createSequentialGroup()
|
88
|
+
.addContainerGap()
|
89
|
+
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
|
90
|
+
.add(layout.createSequentialGroup()
|
91
|
+
.add(21, 21, 21)
|
92
|
+
.add(search_label)
|
93
|
+
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
|
94
|
+
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
|
95
|
+
.add(search_combo, 0, 192, Short.MAX_VALUE)
|
96
|
+
.add(from_start, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
97
|
+
.add(regex, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
98
|
+
.add(whole_words, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
99
|
+
.add(forwards, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
100
|
+
.add(backwards)))
|
101
|
+
.add(layout.createSequentialGroup()
|
102
|
+
.add(ok_button)
|
103
|
+
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 160, Short.MAX_VALUE)
|
104
|
+
.add(cancel_button)))
|
105
|
+
.add(16, 16, 16))
|
106
|
+
);
|
107
|
+
layout.setVerticalGroup(
|
108
|
+
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
|
109
|
+
.add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
|
110
|
+
.addContainerGap(23, Short.MAX_VALUE)
|
111
|
+
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
|
112
|
+
.add(search_combo, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
|
113
|
+
.add(search_label))
|
114
|
+
.add(18, 18, 18)
|
115
|
+
.add(from_start)
|
116
|
+
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
|
117
|
+
.add(regex)
|
118
|
+
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
|
119
|
+
.add(whole_words)
|
120
|
+
.add(18, 18, 18)
|
121
|
+
.add(forwards)
|
122
|
+
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
|
123
|
+
.add(backwards)
|
124
|
+
.add(18, 18, 18)
|
125
|
+
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
|
126
|
+
.add(ok_button)
|
127
|
+
.add(cancel_button))
|
128
|
+
.add(20, 20, 20))
|
129
|
+
);
|
130
|
+
}// </editor-fold>//GEN-END:initComponents
|
131
|
+
|
132
|
+
/**
|
133
|
+
* @param args the command line arguments
|
134
|
+
*/
|
135
|
+
public static void main(String args[]) {
|
136
|
+
java.awt.EventQueue.invokeLater(new Runnable() {
|
137
|
+
public void run() {
|
138
|
+
javax.swing.JDialog dialog = new javax.swing.JDialog(new javax.swing.JFrame(), true);
|
139
|
+
dialog.addWindowListener(new java.awt.event.WindowAdapter() {
|
140
|
+
@Override
|
141
|
+
public void windowClosing(java.awt.event.WindowEvent e) {
|
142
|
+
System.exit(0);
|
143
|
+
}
|
144
|
+
});
|
145
|
+
dialog.setVisible(true);
|
146
|
+
}
|
147
|
+
});
|
148
|
+
}
|
149
|
+
|
150
|
+
// Variables declaration - do not modify//GEN-BEGIN:variables
|
151
|
+
public javax.swing.JRadioButton backwards;
|
152
|
+
public javax.swing.JButton cancel_button;
|
153
|
+
public javax.swing.ButtonGroup direction_button_group;
|
154
|
+
public javax.swing.JRadioButton forwards;
|
155
|
+
public javax.swing.JCheckBox from_start;
|
156
|
+
public javax.swing.JButton ok_button;
|
157
|
+
public javax.swing.JCheckBox regex;
|
158
|
+
public javax.swing.JComboBox search_combo;
|
159
|
+
public javax.swing.JLabel search_label;
|
160
|
+
public javax.swing.JCheckBox whole_words;
|
161
|
+
// End of variables declaration//GEN-END:variables
|
162
|
+
|
163
|
+
}
|
@@ -0,0 +1,106 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" ?>
|
2
|
+
|
3
|
+
<Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
4
|
+
<AuxValues>
|
5
|
+
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="2"/>
|
6
|
+
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="true"/>
|
7
|
+
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
8
|
+
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
|
9
|
+
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
|
10
|
+
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="2"/>
|
11
|
+
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
12
|
+
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
13
|
+
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="1"/>
|
14
|
+
</AuxValues>
|
15
|
+
|
16
|
+
<Layout>
|
17
|
+
<DimensionLayout dim="0">
|
18
|
+
<Group type="103" groupAlignment="0" attributes="0">
|
19
|
+
<Group type="102" attributes="0">
|
20
|
+
<EmptySpace max="-2" attributes="0"/>
|
21
|
+
<Group type="103" groupAlignment="0" attributes="0">
|
22
|
+
<Component id="text_field" alignment="0" pref="210" max="32767" attributes="0"/>
|
23
|
+
<Group type="102" alignment="0" attributes="0">
|
24
|
+
<Component id="ok_button" min="-2" max="-2" attributes="0"/>
|
25
|
+
<EmptySpace pref="82" max="32767" attributes="0"/>
|
26
|
+
<Component id="cancel_button" min="-2" max="-2" attributes="0"/>
|
27
|
+
</Group>
|
28
|
+
<Group type="102" alignment="0" attributes="0">
|
29
|
+
<Component id="add_button" min="-2" pref="27" max="-2" attributes="0"/>
|
30
|
+
<EmptySpace max="-2" attributes="0"/>
|
31
|
+
<Component id="remove_button" min="-2" pref="27" max="-2" attributes="0"/>
|
32
|
+
</Group>
|
33
|
+
<Component id="item_list" alignment="0" min="-2" pref="207" max="-2" attributes="0"/>
|
34
|
+
</Group>
|
35
|
+
<EmptySpace max="-2" attributes="0"/>
|
36
|
+
</Group>
|
37
|
+
</Group>
|
38
|
+
</DimensionLayout>
|
39
|
+
<DimensionLayout dim="1">
|
40
|
+
<Group type="103" groupAlignment="0" attributes="0">
|
41
|
+
<Group type="102" alignment="0" attributes="0">
|
42
|
+
<EmptySpace max="-2" attributes="0"/>
|
43
|
+
<Component id="text_field" min="-2" max="-2" attributes="0"/>
|
44
|
+
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
45
|
+
<Component id="item_list" min="-2" pref="199" max="-2" attributes="0"/>
|
46
|
+
<EmptySpace min="-2" pref="15" max="-2" attributes="0"/>
|
47
|
+
<Group type="103" groupAlignment="3" attributes="0">
|
48
|
+
<Component id="add_button" alignment="3" min="-2" pref="20" max="-2" attributes="0"/>
|
49
|
+
<Component id="remove_button" alignment="3" min="-2" pref="19" max="-2" attributes="0"/>
|
50
|
+
</Group>
|
51
|
+
<EmptySpace pref="30" max="32767" attributes="0"/>
|
52
|
+
<Group type="103" groupAlignment="3" attributes="0">
|
53
|
+
<Component id="ok_button" alignment="3" min="-2" max="-2" attributes="0"/>
|
54
|
+
<Component id="cancel_button" alignment="3" min="-2" max="-2" attributes="0"/>
|
55
|
+
</Group>
|
56
|
+
<EmptySpace max="-2" attributes="0"/>
|
57
|
+
</Group>
|
58
|
+
</Group>
|
59
|
+
</DimensionLayout>
|
60
|
+
</Layout>
|
61
|
+
<SubComponents>
|
62
|
+
<Component class="javax.swing.JTextField" name="text_field">
|
63
|
+
<Properties>
|
64
|
+
<Property name="name" type="java.lang.String" value="text_field" noResource="true"/>
|
65
|
+
</Properties>
|
66
|
+
</Component>
|
67
|
+
<Component class="javax.swing.JList" name="item_list">
|
68
|
+
<Properties>
|
69
|
+
<Property name="name" type="java.lang.String" value="item_list" noResource="true"/>
|
70
|
+
</Properties>
|
71
|
+
</Component>
|
72
|
+
<Component class="javax.swing.JButton" name="ok_button">
|
73
|
+
<Properties>
|
74
|
+
<Property name="text" type="java.lang.String" value="OK" noResource="true"/>
|
75
|
+
<Property name="toolTipText" type="java.lang.String" value="Accept selection" noResource="true"/>
|
76
|
+
<Property name="name" type="java.lang.String" value="ok_button" noResource="true"/>
|
77
|
+
</Properties>
|
78
|
+
</Component>
|
79
|
+
<Component class="javax.swing.JButton" name="cancel_button">
|
80
|
+
<Properties>
|
81
|
+
<Property name="text" type="java.lang.String" value="Cancel" noResource="true"/>
|
82
|
+
<Property name="name" type="java.lang.String" value="cancel_button" noResource="true"/>
|
83
|
+
</Properties>
|
84
|
+
</Component>
|
85
|
+
<Component class="javax.swing.JButton" name="add_button">
|
86
|
+
<Properties>
|
87
|
+
<Property name="text" type="java.lang.String" value="+" noResource="true"/>
|
88
|
+
<Property name="toolTipText" type="java.lang.String" value="Add a new item" noResource="true"/>
|
89
|
+
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
90
|
+
<Border info="null"/>
|
91
|
+
</Property>
|
92
|
+
<Property name="name" type="java.lang.String" value="add_button" noResource="true"/>
|
93
|
+
</Properties>
|
94
|
+
</Component>
|
95
|
+
<Component class="javax.swing.JButton" name="remove_button">
|
96
|
+
<Properties>
|
97
|
+
<Property name="text" type="java.lang.String" value="-" noResource="true"/>
|
98
|
+
<Property name="toolTipText" type="java.lang.String" value="Remove selected item" noResource="true"/>
|
99
|
+
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
100
|
+
<Border info="null"/>
|
101
|
+
</Property>
|
102
|
+
<Property name="name" type="java.lang.String" value="remove_button" noResource="true"/>
|
103
|
+
</Properties>
|
104
|
+
</Component>
|
105
|
+
</SubComponents>
|
106
|
+
</Form>
|