Creation des dialogs
This commit is contained in:
18
.classpath
Normal file
18
.classpath
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/java-8-openjdk-amd64"/>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="lib" path="/home/alexis/.p2/pool/plugins/org.eclipse.osgi_3.15.0.v20190830-1434.jar" sourcepath="/home/alexis/.p2/pool/plugins/org.eclipse.osgi_3.15.0.v20190830-1434.jar"/>
|
||||
<classpathentry kind="lib" path="/home/alexis/.p2/pool/plugins/org.eclipse.core.commands_3.9.500.v20190805-1157.jar" sourcepath="/home/alexis/.p2/pool/plugins/org.eclipse.core.commands_3.9.500.v20190805-1157.jar"/>
|
||||
<classpathentry kind="lib" path="/home/alexis/.p2/pool/plugins/org.eclipse.equinox.common_3.10.500.v20190815-1535.jar" sourcepath="/home/alexis/.p2/pool/plugins/org.eclipse.equinox.common_3.10.500.v20190815-1535.jar"/>
|
||||
<classpathentry kind="lib" path="/home/alexis/.p2/pool/plugins/org.eclipse.equinox.registry_3.8.500.v20190714-1850.jar" sourcepath="/home/alexis/.p2/pool/plugins/org.eclipse.equinox.registry_3.8.500.v20190714-1850.jar"/>
|
||||
<classpathentry kind="lib" path="/home/alexis/.p2/pool/plugins/org.eclipse.core.runtime_3.16.0.v20190823-1314.jar" sourcepath="/home/alexis/.p2/pool/plugins/org.eclipse.core.runtime_3.16.0.v20190823-1314.jar"/>
|
||||
<classpathentry kind="lib" path="/home/alexis/.p2/pool/plugins/org.eclipse.text_3.9.0.v20190826-1019.jar" sourcepath="/home/alexis/.p2/pool/plugins/org.eclipse.text_3.9.0.v20190826-1019.jar"/>
|
||||
<classpathentry kind="lib" path="/home/alexis/.p2/pool/plugins/org.eclipse.swt.gtk.linux.x86_64_3.112.0.v20190904-0609.jar" sourcepath="/home/alexis/.p2/pool/plugins/org.eclipse.swt.gtk.linux.x86_64_3.112.0.v20190904-0609.jar"/>
|
||||
<classpathentry kind="lib" path="/home/alexis/.p2/pool/plugins/org.eclipse.jface_3.17.0.v20190820-1444.jar" sourcepath="/home/alexis/.p2/pool/plugins/org.eclipse.jface_3.17.0.v20190820-1444.jar"/>
|
||||
<classpathentry kind="lib" path="/home/alexis/.p2/pool/plugins/org.eclipse.jface.text_3.15.300.v20190819-0725.jar" sourcepath="/home/alexis/.p2/pool/plugins/org.eclipse.jface.text_3.15.300.v20190819-0725.jar"/>
|
||||
<classpathentry kind="lib" path="/home/alexis/.p2/pool/plugins/org.eclipse.ui.workbench_3.116.0.v20190826-1428.jar" sourcepath="/home/alexis/.p2/pool/plugins/org.eclipse.ui.workbench_3.116.0.v20190826-1428.jar"/>
|
||||
<classpathentry kind="lib" path="/home/alexis/.p2/pool/plugins/com.ibm.icu_64.2.0.v20190507-1337.jar" sourcepath="/home/alexis/.p2/pool/plugins/com.ibm.icu_64.2.0.v20190507-1337.jar"/>
|
||||
<classpathentry kind="lib" path="/home/alexis/.p2/pool/plugins/org.eclipse.ui.forms_3.8.100.v20190625-1825.jar" sourcepath="/home/alexis/.p2/pool/plugins/org.eclipse.ui.forms_3.8.100.v20190625-1825.jar"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
bin/
|
||||
19
.idea/$PRODUCT_WORKSPACE_FILE$
generated
Normal file
19
.idea/$PRODUCT_WORKSPACE_FILE$
generated
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="masterDetails">
|
||||
<states>
|
||||
<state key="ProjectJDKs.UI">
|
||||
<settings>
|
||||
<last-edited>11</last-edited>
|
||||
<splitter-proportions>
|
||||
<option name="proportions">
|
||||
<list>
|
||||
<option value="0.2" />
|
||||
</list>
|
||||
</option>
|
||||
</splitter-proportions>
|
||||
</settings>
|
||||
</state>
|
||||
</states>
|
||||
</component>
|
||||
</project>
|
||||
6
.idea/misc.xml
generated
Normal file
6
.idea/misc.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" project-jdk-name="11" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
||||
8
.idea/modules.xml
generated
Normal file
8
.idea/modules.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/cURLing.iml" filepath="$PROJECT_DIR$/cURLing.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
124
.idea/uiDesigner.xml
generated
Normal file
124
.idea/uiDesigner.xml
generated
Normal file
@@ -0,0 +1,124 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Palette2">
|
||||
<group name="Swing">
|
||||
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
|
||||
</item>
|
||||
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
|
||||
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
|
||||
<initial-values>
|
||||
<property name="text" value="Button" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="RadioButton" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="CheckBox" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="Label" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
|
||||
<preferred-size width="-1" height="20" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
|
||||
</item>
|
||||
</group>
|
||||
</component>
|
||||
</project>
|
||||
69
.idea/workspace.xml
generated
Normal file
69
.idea/workspace.xml
generated
Normal file
@@ -0,0 +1,69 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="e7334e23-5435-4e6d-8822-56d062382d3d" name="Default Changelist" comment="" />
|
||||
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||
</component>
|
||||
<component name="ProjectId" id="1SIKwW06CzaPdxUFr949xYvEVL0" />
|
||||
<component name="PropertiesComponent">
|
||||
<property name="WebServerToolWindowFactoryState" value="false" />
|
||||
<property name="aspect.path.notification.shown" value="true" />
|
||||
<property name="last_opened_file_path" value="$USER_HOME$/IdeaProjects" />
|
||||
<property name="nodejs_package_manager_path" value="npm" />
|
||||
</component>
|
||||
<component name="RunDashboard">
|
||||
<option name="ruleStates">
|
||||
<list>
|
||||
<RuleState>
|
||||
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
|
||||
</RuleState>
|
||||
<RuleState>
|
||||
<option name="name" value="StatusDashboardGroupingRule" />
|
||||
</RuleState>
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="RunManager">
|
||||
<configuration name="Runtime" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
|
||||
<option name="MAIN_CLASS_NAME" value="ovh.alexisdelhaie.curling.Runtime" />
|
||||
<module name="cURLing" />
|
||||
<extension name="coverage">
|
||||
<pattern>
|
||||
<option name="PATTERN" value="ovh.alexisdelhaie.curling.*" />
|
||||
<option name="ENABLED" value="true" />
|
||||
</pattern>
|
||||
</extension>
|
||||
<method v="2">
|
||||
<option name="Make" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
<recent_temporary>
|
||||
<list>
|
||||
<item itemvalue="Application.Runtime" />
|
||||
</list>
|
||||
</recent_temporary>
|
||||
</component>
|
||||
<component name="SvnConfiguration">
|
||||
<configuration />
|
||||
</component>
|
||||
<component name="TaskManager">
|
||||
<task active="true" id="Default" summary="Default task">
|
||||
<changelist id="e7334e23-5435-4e6d-8822-56d062382d3d" name="Default Changelist" comment="" />
|
||||
<created>1571245908473</created>
|
||||
<option name="number" value="Default" />
|
||||
<option name="presentableId" value="Default" />
|
||||
<updated>1571245908473</updated>
|
||||
<workItem from="1571245913529" duration="122000" />
|
||||
<workItem from="1571246060512" duration="9854000" />
|
||||
<workItem from="1571255923711" duration="810000" />
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TypeScriptGeneratedFilesManager">
|
||||
<option name="version" value="1" />
|
||||
</component>
|
||||
</project>
|
||||
17
.project
Normal file
17
.project
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>cURLing</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
11
.settings/org.eclipse.jdt.core.prefs
Normal file
11
.settings/org.eclipse.jdt.core.prefs
Normal file
@@ -0,0 +1,11 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
||||
161
cURLing.iml
Normal file
161
cURLing.iml
Normal file
@@ -0,0 +1,161 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="EclipseModuleManager">
|
||||
<libelement value="jar://$USER_HOME$/.p2/pool/plugins/org.eclipse.osgi_3.15.0.v20190830-1434.jar!/" />
|
||||
<libelement value="jar://$USER_HOME$/.p2/pool/plugins/org.eclipse.core.commands_3.9.500.v20190805-1157.jar!/" />
|
||||
<libelement value="jar://$USER_HOME$/.p2/pool/plugins/org.eclipse.equinox.common_3.10.500.v20190815-1535.jar!/" />
|
||||
<libelement value="jar://$USER_HOME$/.p2/pool/plugins/org.eclipse.equinox.registry_3.8.500.v20190714-1850.jar!/" />
|
||||
<libelement value="jar://$USER_HOME$/.p2/pool/plugins/org.eclipse.core.runtime_3.16.0.v20190823-1314.jar!/" />
|
||||
<libelement value="jar://$USER_HOME$/.p2/pool/plugins/org.eclipse.text_3.9.0.v20190826-1019.jar!/" />
|
||||
<libelement value="jar://$USER_HOME$/.p2/pool/plugins/org.eclipse.swt.gtk.linux.x86_64_3.112.0.v20190904-0609.jar!/" />
|
||||
<libelement value="jar://$USER_HOME$/.p2/pool/plugins/org.eclipse.jface_3.17.0.v20190820-1444.jar!/" />
|
||||
<libelement value="jar://$USER_HOME$/.p2/pool/plugins/org.eclipse.jface.text_3.15.300.v20190819-0725.jar!/" />
|
||||
<libelement value="jar://$USER_HOME$/.p2/pool/plugins/org.eclipse.ui.workbench_3.116.0.v20190826-1428.jar!/" />
|
||||
<libelement value="jar://$USER_HOME$/.p2/pool/plugins/com.ibm.icu_64.2.0.v20190507-1337.jar!/" />
|
||||
<libelement value="jar://$USER_HOME$/.p2/pool/plugins/org.eclipse.ui.forms_3.8.100.v20190625-1825.jar!/" />
|
||||
<src_description expected_position="1">
|
||||
<src_folder value="file://$MODULE_DIR$/src" expected_position="1" />
|
||||
</src_description>
|
||||
</component>
|
||||
<component name="NewModuleRootManager">
|
||||
<output url="file://$MODULE_DIR$/bin" />
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module-library">
|
||||
<library name="org.eclipse.osgi_3.15.0.v20190830-1434.jar">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.p2/pool/plugins/org.eclipse.osgi_3.15.0.v20190830-1434.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/.p2/pool/plugins/org.eclipse.osgi_3.15.0.v20190830-1434.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="org.eclipse.core.commands_3.9.500.v20190805-1157.jar">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.p2/pool/plugins/org.eclipse.core.commands_3.9.500.v20190805-1157.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/.p2/pool/plugins/org.eclipse.core.commands_3.9.500.v20190805-1157.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="org.eclipse.equinox.common_3.10.500.v20190815-1535.jar">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.p2/pool/plugins/org.eclipse.equinox.common_3.10.500.v20190815-1535.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/.p2/pool/plugins/org.eclipse.equinox.common_3.10.500.v20190815-1535.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="org.eclipse.equinox.registry_3.8.500.v20190714-1850.jar">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.p2/pool/plugins/org.eclipse.equinox.registry_3.8.500.v20190714-1850.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/.p2/pool/plugins/org.eclipse.equinox.registry_3.8.500.v20190714-1850.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="org.eclipse.core.runtime_3.16.0.v20190823-1314.jar">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.p2/pool/plugins/org.eclipse.core.runtime_3.16.0.v20190823-1314.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/.p2/pool/plugins/org.eclipse.core.runtime_3.16.0.v20190823-1314.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="org.eclipse.text_3.9.0.v20190826-1019.jar">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.p2/pool/plugins/org.eclipse.text_3.9.0.v20190826-1019.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/.p2/pool/plugins/org.eclipse.text_3.9.0.v20190826-1019.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="org.eclipse.swt.gtk.linux.x86_64_3.112.0.v20190904-0609.jar">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.p2/pool/plugins/org.eclipse.swt.gtk.linux.x86_64_3.112.0.v20190904-0609.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/.p2/pool/plugins/org.eclipse.swt.gtk.linux.x86_64_3.112.0.v20190904-0609.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="org.eclipse.jface_3.17.0.v20190820-1444.jar">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.p2/pool/plugins/org.eclipse.jface_3.17.0.v20190820-1444.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/.p2/pool/plugins/org.eclipse.jface_3.17.0.v20190820-1444.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="org.eclipse.jface.text_3.15.300.v20190819-0725.jar">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.p2/pool/plugins/org.eclipse.jface.text_3.15.300.v20190819-0725.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/.p2/pool/plugins/org.eclipse.jface.text_3.15.300.v20190819-0725.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="org.eclipse.ui.workbench_3.116.0.v20190826-1428.jar">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.p2/pool/plugins/org.eclipse.ui.workbench_3.116.0.v20190826-1428.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/.p2/pool/plugins/org.eclipse.ui.workbench_3.116.0.v20190826-1428.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="com.ibm.icu_64.2.0.v20190507-1337.jar">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.p2/pool/plugins/com.ibm.icu_64.2.0.v20190507-1337.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/.p2/pool/plugins/com.ibm.icu_64.2.0.v20190507-1337.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="org.eclipse.ui.forms_3.8.100.v20190625-1825.jar">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.p2/pool/plugins/org.eclipse.ui.forms_3.8.100.v20190625-1825.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/.p2/pool/plugins/org.eclipse.ui.forms_3.8.100.v20190625-1825.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</orderEntry>
|
||||
</component>
|
||||
</module>
|
||||
12
src/ovh/alexisdelhaie/curling/Runtime.java
Normal file
12
src/ovh/alexisdelhaie/curling/Runtime.java
Normal file
@@ -0,0 +1,12 @@
|
||||
package ovh.alexisdelhaie.curling;
|
||||
|
||||
import ovh.alexisdelhaie.curling.windows.MainWindow;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
public class Runtime {
|
||||
public static void main(String[] args) {
|
||||
MainWindow window = new MainWindow();
|
||||
window.showFrame();
|
||||
}
|
||||
}
|
||||
96
src/ovh/alexisdelhaie/curling/windows/AddHeader.form
Normal file
96
src/ovh/alexisdelhaie/curling/windows/AddHeader.form
Normal file
@@ -0,0 +1,96 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="ovh.alexisdelhaie.curling.windows.AddHeader">
|
||||
<grid id="cbd77" binding="contentPane" layout-manager="GridLayoutManager" row-count="2" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="10" left="10" bottom="10" right="10"/>
|
||||
<constraints>
|
||||
<xy x="48" y="188" width="436" height="163"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="94766" layout-manager="GridLayoutManager" row-count="1" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="1" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<hspacer id="98af6">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
</hspacer>
|
||||
<grid id="9538f" layout-manager="GridLayoutManager" row-count="1" column-count="2" same-size-horizontally="true" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<component id="e7465" class="javax.swing.JButton" binding="buttonOK">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text value="OK"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="5723f" class="javax.swing.JButton" binding="buttonCancel">
|
||||
<constraints>
|
||||
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text value="Cancel"/>
|
||||
</properties>
|
||||
</component>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="e3588" layout-manager="GridLayoutManager" row-count="2" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<component id="72dff" class="javax.swing.JLabel">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text value="Key"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="fb2ca" class="javax.swing.JTextField" binding="keyField">
|
||||
<constraints>
|
||||
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
|
||||
<preferred-size width="150" height="-1"/>
|
||||
</grid>
|
||||
</constraints>
|
||||
<properties/>
|
||||
</component>
|
||||
<component id="f8957" class="javax.swing.JLabel">
|
||||
<constraints>
|
||||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text value="Value"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="61af2" class="javax.swing.JTextField" binding="valueField">
|
||||
<constraints>
|
||||
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
|
||||
<preferred-size width="150" height="-1"/>
|
||||
</grid>
|
||||
</constraints>
|
||||
<properties/>
|
||||
</component>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
</form>
|
||||
72
src/ovh/alexisdelhaie/curling/windows/AddHeader.java
Normal file
72
src/ovh/alexisdelhaie/curling/windows/AddHeader.java
Normal file
@@ -0,0 +1,72 @@
|
||||
package ovh.alexisdelhaie.curling.windows;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.event.*;
|
||||
|
||||
public class AddHeader extends JDialog {
|
||||
|
||||
public static String WINDOW_TITLE = "Ajouter une en-tête";
|
||||
|
||||
private JPanel contentPane;
|
||||
private JButton buttonOK;
|
||||
private JButton buttonCancel;
|
||||
private JTextField keyField;
|
||||
private JTextField valueField;
|
||||
|
||||
private String value;
|
||||
|
||||
public AddHeader() {
|
||||
this.value = "";
|
||||
setContentPane(contentPane);
|
||||
setModal(true);
|
||||
setTitle(WINDOW_TITLE);
|
||||
getRootPane().setDefaultButton(buttonOK);
|
||||
|
||||
buttonOK.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
onOK();
|
||||
}
|
||||
});
|
||||
|
||||
buttonCancel.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
onCancel();
|
||||
}
|
||||
});
|
||||
|
||||
// call onCancel() when cross is clicked
|
||||
setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
|
||||
addWindowListener(new WindowAdapter() {
|
||||
public void windowClosing(WindowEvent e) {
|
||||
onCancel();
|
||||
}
|
||||
});
|
||||
|
||||
// call onCancel() on ESCAPE
|
||||
contentPane.registerKeyboardAction(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
onCancel();
|
||||
}
|
||||
}, KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
|
||||
}
|
||||
|
||||
private void onOK() {
|
||||
if(!keyField.getText().isBlank()) {
|
||||
value = keyField.getText();
|
||||
if(!valueField.getText().isBlank()) {
|
||||
value += String.format(": %s", valueField.getText());
|
||||
}
|
||||
}
|
||||
dispose();
|
||||
}
|
||||
|
||||
private void onCancel() {
|
||||
dispose();
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
pack();
|
||||
setVisible(true);
|
||||
return value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="ovh.alexisdelhaie.curling.windows.BasicAuthenticationDialog">
|
||||
<grid id="cbd77" binding="contentPane" layout-manager="GridLayoutManager" row-count="2" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="10" left="10" bottom="10" right="10"/>
|
||||
<constraints>
|
||||
<xy x="48" y="54" width="436" height="297"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="94766" layout-manager="GridLayoutManager" row-count="1" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="1" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<hspacer id="98af6">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
</hspacer>
|
||||
<grid id="9538f" layout-manager="GridLayoutManager" row-count="1" column-count="2" same-size-horizontally="true" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<component id="e7465" class="javax.swing.JButton" binding="buttonOK">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text value="OK"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="5723f" class="javax.swing.JButton" binding="buttonCancel">
|
||||
<constraints>
|
||||
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text value="Cancel"/>
|
||||
</properties>
|
||||
</component>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="e3588" layout-manager="GridLayoutManager" row-count="2" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<component id="8207b" class="javax.swing.JLabel">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text value="Username"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="6459c" class="javax.swing.JTextField" binding="textField1" default-binding="true">
|
||||
<constraints>
|
||||
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
|
||||
<preferred-size width="150" height="-1"/>
|
||||
</grid>
|
||||
</constraints>
|
||||
<properties/>
|
||||
</component>
|
||||
<component id="1c26c" class="javax.swing.JLabel">
|
||||
<constraints>
|
||||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text value="Password"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="b5c19" class="javax.swing.JPasswordField" binding="passwordField1" default-binding="true">
|
||||
<constraints>
|
||||
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
|
||||
<preferred-size width="150" height="-1"/>
|
||||
</grid>
|
||||
</constraints>
|
||||
<properties/>
|
||||
</component>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
</form>
|
||||
@@ -0,0 +1,90 @@
|
||||
package ovh.alexisdelhaie.curling.windows;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.event.*;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Base64;
|
||||
|
||||
public class BasicAuthenticationDialog extends JDialog {
|
||||
|
||||
public static String HTTP_AUTH_BASIC_PATTERN = "Authorization: Basic %s";
|
||||
public static String WINDOW_TITLE = "Authentification HTTP";
|
||||
|
||||
private JPanel contentPane;
|
||||
private JButton buttonOK;
|
||||
private JButton buttonCancel;
|
||||
private JTextField textField1;
|
||||
private JPasswordField passwordField1;
|
||||
|
||||
private String value = "";
|
||||
|
||||
public BasicAuthenticationDialog() {
|
||||
setContentPane(contentPane);
|
||||
setModal(true);
|
||||
setTitle(WINDOW_TITLE);
|
||||
getRootPane().setDefaultButton(buttonOK);
|
||||
|
||||
buttonOK.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
onOK();
|
||||
}
|
||||
});
|
||||
|
||||
buttonCancel.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
onCancel();
|
||||
}
|
||||
});
|
||||
|
||||
// call onCancel() when cross is clicked
|
||||
setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
|
||||
addWindowListener(new WindowAdapter() {
|
||||
public void windowClosing(WindowEvent e) {
|
||||
onCancel();
|
||||
}
|
||||
});
|
||||
|
||||
// call onCancel() on ESCAPE
|
||||
contentPane.registerKeyboardAction(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
onCancel();
|
||||
}
|
||||
}, KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
|
||||
}
|
||||
|
||||
private void onOK() {
|
||||
if(!isUsernameBlank() && !isPasswordBlank()) {
|
||||
String user = textField1.getText();
|
||||
String password = new String(passwordField1.getPassword());
|
||||
byte[] authEncodedBytes = Base64.getEncoder()
|
||||
.encode(String.format("%s:%s", user, password).getBytes());
|
||||
try {
|
||||
String authEncoded = new String(authEncodedBytes, "UTF-8");
|
||||
value = String.format(HTTP_AUTH_BASIC_PATTERN, authEncoded);
|
||||
dispose();
|
||||
} catch (UnsupportedEncodingException ex) {
|
||||
JOptionPane.showMessageDialog(this, "Le format UTF-8 n'est pas supporté");
|
||||
}
|
||||
} else {
|
||||
JOptionPane.showMessageDialog(this, "Vous devez remplir les 2 champs");
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isPasswordBlank() {
|
||||
return passwordField1.getPassword().length == 0;
|
||||
}
|
||||
|
||||
private boolean isUsernameBlank() {
|
||||
return textField1.getText().isBlank();
|
||||
}
|
||||
|
||||
private void onCancel() {
|
||||
dispose();
|
||||
}
|
||||
|
||||
public String showDialog() {
|
||||
pack();
|
||||
setVisible(true);
|
||||
return value;
|
||||
}
|
||||
}
|
||||
128
src/ovh/alexisdelhaie/curling/windows/FormEncodedDialog.form
Normal file
128
src/ovh/alexisdelhaie/curling/windows/FormEncodedDialog.form
Normal file
@@ -0,0 +1,128 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="ovh.alexisdelhaie.curling.windows.FormEncodedDialog">
|
||||
<grid id="cbd77" binding="contentPane" layout-manager="GridLayoutManager" row-count="4" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="10" left="10" bottom="10" right="10"/>
|
||||
<constraints>
|
||||
<xy x="48" y="54" width="436" height="346"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="94766" layout-manager="GridLayoutManager" row-count="1" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="3" column="0" row-span="1" col-span="3" vsize-policy="1" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<hspacer id="98af6">
|
||||
<constraints>
|
||||
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
</hspacer>
|
||||
<grid id="9538f" layout-manager="GridLayoutManager" row-count="1" column-count="2" same-size-horizontally="true" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="0" column="2" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<component id="e7465" class="javax.swing.JButton" binding="buttonOK">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text value="OK"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="5723f" class="javax.swing.JButton" binding="buttonCancel">
|
||||
<constraints>
|
||||
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text value="Cancel"/>
|
||||
</properties>
|
||||
</component>
|
||||
</children>
|
||||
</grid>
|
||||
<component id="fc73f" class="javax.swing.JButton" binding="addButton" default-binding="true">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text value="Add"/>
|
||||
</properties>
|
||||
</component>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="e3588" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="3" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<scrollpane id="1d719">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<component id="3c2f3" class="javax.swing.JList" binding="list1" default-binding="true">
|
||||
<constraints/>
|
||||
<properties/>
|
||||
</component>
|
||||
</children>
|
||||
</scrollpane>
|
||||
</children>
|
||||
</grid>
|
||||
<component id="60e85" class="javax.swing.JLabel">
|
||||
<constraints>
|
||||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text value="Key"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="5b04f" class="javax.swing.JTextField" binding="keyField">
|
||||
<constraints>
|
||||
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
|
||||
<preferred-size width="150" height="-1"/>
|
||||
</grid>
|
||||
</constraints>
|
||||
<properties/>
|
||||
</component>
|
||||
<component id="947ac" class="javax.swing.JLabel">
|
||||
<constraints>
|
||||
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text value="Content"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="328a" class="javax.swing.JTextArea" binding="valueField">
|
||||
<constraints>
|
||||
<grid row="2" column="1" row-span="1" col-span="1" vsize-policy="6" hsize-policy="6" anchor="0" fill="3" indent="0" use-parent-layout="false">
|
||||
<preferred-size width="150" height="50"/>
|
||||
</grid>
|
||||
</constraints>
|
||||
<properties/>
|
||||
</component>
|
||||
<component id="3fe5d" class="javax.swing.JComboBox" binding="encodageField">
|
||||
<constraints>
|
||||
<grid row="2" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<model>
|
||||
<item value="Plain"/>
|
||||
<item value="base64"/>
|
||||
</model>
|
||||
</properties>
|
||||
</component>
|
||||
</children>
|
||||
</grid>
|
||||
</form>
|
||||
118
src/ovh/alexisdelhaie/curling/windows/FormEncodedDialog.java
Normal file
118
src/ovh/alexisdelhaie/curling/windows/FormEncodedDialog.java
Normal file
@@ -0,0 +1,118 @@
|
||||
package ovh.alexisdelhaie.curling.windows;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.event.*;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Base64;
|
||||
|
||||
public class FormEncodedDialog extends JDialog {
|
||||
|
||||
public static String WINDOW_TITLE = "Formulaire de données";
|
||||
|
||||
private JPanel contentPane;
|
||||
private JButton buttonOK;
|
||||
private JButton buttonCancel;
|
||||
private JTextField keyField;
|
||||
private JTextArea valueField;
|
||||
private JList list1;
|
||||
private JButton addButton;
|
||||
private JComboBox encodageField;
|
||||
|
||||
private String resultValue = "";
|
||||
private DefaultListModel<String> model;
|
||||
public static String[] UNENCODED_CHAR = {"!", "*", "'", "(", ")", ";", ":", "@", "&", "=", "+", "$", ",", "/", "?", "#", "[", "]"};
|
||||
public static String[] ENCODED_CHAR = {"%21", "%2A", "%27", "%28", "%29", "%3B", "%3A", "%40", "%26", "%3D", "%2B", "%24", "%2C", "%2F", "%3F", "%23", "%5B", "%5D"};
|
||||
|
||||
public FormEncodedDialog() {
|
||||
setContentPane(contentPane);
|
||||
setModal(true);
|
||||
setTitle(WINDOW_TITLE);
|
||||
model = new DefaultListModel<>();
|
||||
list1.setModel(model);
|
||||
|
||||
addButton.addActionListener((event) -> {
|
||||
String key = keyField.getText();
|
||||
String value = "";
|
||||
if(encodageField.getSelectedItem().equals("base64")) {
|
||||
value = encodeValue(encodeBase64(valueField.getText()));
|
||||
} else {
|
||||
value = encodeValue(valueField.getText());
|
||||
}
|
||||
clearField();
|
||||
String keyValue = String.format("%s=%s", key, value);
|
||||
model.addElement(keyValue);
|
||||
list1.updateUI();
|
||||
});
|
||||
|
||||
buttonOK.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
onOK();
|
||||
}
|
||||
});
|
||||
|
||||
buttonCancel.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
onCancel();
|
||||
}
|
||||
});
|
||||
|
||||
// call onCancel() when cross is clicked
|
||||
setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
|
||||
addWindowListener(new WindowAdapter() {
|
||||
public void windowClosing(WindowEvent e) {
|
||||
onCancel();
|
||||
}
|
||||
});
|
||||
|
||||
// call onCancel() on ESCAPE
|
||||
contentPane.registerKeyboardAction(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
onCancel();
|
||||
}
|
||||
}, KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
|
||||
}
|
||||
|
||||
private String encodeBase64(String text) {
|
||||
byte[] encoded = Base64.getEncoder().encode(text.getBytes());
|
||||
try {
|
||||
return new String(encoded, "UTF-8");
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
private void onOK() {
|
||||
for(int i = 0; i < model.getSize(); i++) {
|
||||
if(i == 0) {
|
||||
resultValue = (String)model.get(i);
|
||||
} else {
|
||||
resultValue += String.format("&%s", (String)model.get(i));
|
||||
}
|
||||
}
|
||||
dispose();
|
||||
}
|
||||
|
||||
private void clearField() {
|
||||
keyField.setText("");
|
||||
valueField.setText("");
|
||||
}
|
||||
|
||||
private String encodeValue(String s) {
|
||||
String result = s;
|
||||
for(int i = 0; i < UNENCODED_CHAR.length ; i++) {
|
||||
result = result.replace(UNENCODED_CHAR[i], ENCODED_CHAR[i]);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private void onCancel() {
|
||||
// add your code here if necessary
|
||||
dispose();
|
||||
}
|
||||
|
||||
public String showDialog() {
|
||||
pack();
|
||||
setVisible(true);
|
||||
return resultValue;
|
||||
}
|
||||
}
|
||||
141
src/ovh/alexisdelhaie/curling/windows/MainWindow.form
Normal file
141
src/ovh/alexisdelhaie/curling/windows/MainWindow.form
Normal file
@@ -0,0 +1,141 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="ovh.alexisdelhaie.curling.windows.MainWindow">
|
||||
<grid id="cbd77" binding="contentPane" layout-manager="GridLayoutManager" row-count="6" column-count="5" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="10" left="10" bottom="10" right="10"/>
|
||||
<constraints>
|
||||
<xy x="48" y="54" width="739" height="412"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none" title="cURLing"/>
|
||||
<children>
|
||||
<component id="15009" class="javax.swing.JTextArea" binding="textArea1" default-binding="true">
|
||||
<constraints>
|
||||
<grid row="0" column="3" row-span="5" col-span="2" vsize-policy="6" hsize-policy="6" anchor="0" fill="3" indent="0" use-parent-layout="false">
|
||||
<preferred-size width="150" height="50"/>
|
||||
</grid>
|
||||
</constraints>
|
||||
<properties>
|
||||
<editable value="false"/>
|
||||
<focusable value="false"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="b4b69" class="javax.swing.JComboBox" binding="comboBox1" default-binding="true">
|
||||
<constraints>
|
||||
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<model>
|
||||
<item value="HTTP"/>
|
||||
<item value="HTTPS"/>
|
||||
</model>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="dc7ca" class="javax.swing.JComboBox" binding="comboBox2" default-binding="true">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<model>
|
||||
<item value="GET"/>
|
||||
<item value="POST"/>
|
||||
<item value="DELETE"/>
|
||||
<item value="PUT"/>
|
||||
</model>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="3d00f" class="javax.swing.JTextField" binding="textField1" default-binding="true">
|
||||
<constraints>
|
||||
<grid row="0" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
|
||||
<preferred-size width="150" height="-1"/>
|
||||
</grid>
|
||||
</constraints>
|
||||
<properties/>
|
||||
</component>
|
||||
<component id="adde4" class="javax.swing.JLabel">
|
||||
<constraints>
|
||||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text value="Custom headers"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="1286d" class="javax.swing.JLabel">
|
||||
<constraints>
|
||||
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text value="Body datas"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="627e7" class="javax.swing.JButton" binding="xFormEncodedButton" default-binding="true">
|
||||
<constraints>
|
||||
<grid row="3" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<label value="Add X-form-encoded values"/>
|
||||
<text value="Add X-form-encoded values"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="10f69" class="javax.swing.JProgressBar" binding="progressBar1" default-binding="true">
|
||||
<constraints>
|
||||
<grid row="5" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
</component>
|
||||
<component id="76150" class="javax.swing.JButton" binding="newHeaderButton">
|
||||
<constraints>
|
||||
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<label value="New header"/>
|
||||
<text value="New header"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="3d3b2" class="javax.swing.JButton" binding="addAuthButton">
|
||||
<constraints>
|
||||
<grid row="1" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<label value="Basic authentication"/>
|
||||
<text value="Basic authentication"/>
|
||||
</properties>
|
||||
</component>
|
||||
<scrollpane id="4befb">
|
||||
<constraints>
|
||||
<grid row="2" column="0" row-span="1" col-span="3" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<component id="9adda" class="javax.swing.JList" binding="list1" default-binding="true">
|
||||
<constraints/>
|
||||
<properties/>
|
||||
</component>
|
||||
</children>
|
||||
</scrollpane>
|
||||
<scrollpane id="cdcdf">
|
||||
<constraints>
|
||||
<grid row="4" column="0" row-span="2" col-span="3" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<component id="f5002" class="javax.swing.JTextArea" binding="bodyArea">
|
||||
<constraints/>
|
||||
<properties/>
|
||||
</component>
|
||||
</children>
|
||||
</scrollpane>
|
||||
<component id="c866d" class="javax.swing.JButton" binding="runButton">
|
||||
<constraints>
|
||||
<grid row="5" column="3" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<enabled value="false"/>
|
||||
<label value="Start"/>
|
||||
<text value="Start"/>
|
||||
</properties>
|
||||
</component>
|
||||
</children>
|
||||
</grid>
|
||||
</form>
|
||||
67
src/ovh/alexisdelhaie/curling/windows/MainWindow.java
Normal file
67
src/ovh/alexisdelhaie/curling/windows/MainWindow.java
Normal file
@@ -0,0 +1,67 @@
|
||||
package ovh.alexisdelhaie.curling.windows;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
||||
public class MainWindow extends JDialog {
|
||||
|
||||
private DefaultListModel<String> model;
|
||||
|
||||
private JPanel contentPane;
|
||||
private JTextField textField1;
|
||||
private JTextArea textArea1;
|
||||
private JComboBox comboBox1;
|
||||
private JComboBox comboBox2;
|
||||
private JButton xFormEncodedButton;
|
||||
private JTextArea bodyArea;
|
||||
private JProgressBar progressBar1;
|
||||
private JList list1;
|
||||
private JButton newHeaderButton;
|
||||
private JButton addAuthButton;
|
||||
private JButton runButton;
|
||||
|
||||
public static int WINDOW_HEIGHT = 700;
|
||||
public static int WINDOW_WIDTH = 1100;
|
||||
public static String WINDOW_TITLE = "cURLing";
|
||||
|
||||
public MainWindow() {
|
||||
super((Dialog) null);
|
||||
setTitle(WINDOW_TITLE);
|
||||
model = new DefaultListModel<>();
|
||||
list1.setModel(model);
|
||||
setContentPane(contentPane);
|
||||
setMinimumSize(new Dimension(WINDOW_WIDTH, WINDOW_HEIGHT));
|
||||
setSize(WINDOW_WIDTH, WINDOW_HEIGHT);
|
||||
setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
|
||||
|
||||
newHeaderButton.addActionListener((event) -> {
|
||||
AddHeader ah = new AddHeader();
|
||||
String header = ah.getValue();
|
||||
model.addElement(header);
|
||||
list1.updateUI();
|
||||
});
|
||||
|
||||
addAuthButton.addActionListener((event) -> {
|
||||
if(addAuthButton.isEnabled()) {
|
||||
BasicAuthenticationDialog bad = new BasicAuthenticationDialog();
|
||||
String auth = bad.showDialog();
|
||||
if(!auth.isBlank()) {
|
||||
addAuthButton.setEnabled(false);
|
||||
model.addElement(auth);
|
||||
list1.updateUI();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
xFormEncodedButton.addActionListener((event) -> {
|
||||
FormEncodedDialog fe = new FormEncodedDialog();
|
||||
String datas = fe.showDialog();
|
||||
bodyArea.setText(datas);
|
||||
});
|
||||
}
|
||||
|
||||
public void showFrame() {
|
||||
pack();
|
||||
setVisible(true);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user