Compare commits
12 Commits
v1.3-Caesu
...
option/cla
Author | SHA1 | Date | |
---|---|---|---|
b9eac22438
|
|||
df376249f0
|
|||
63ffafb7b8
|
|||
![]() |
b43da72604 | ||
![]() |
ca8d2fd8e6 | ||
![]() |
2d12e5ad91 | ||
![]() |
f1d67bf8c7 | ||
![]() |
f7366f0fee | ||
![]() |
8b2e038551 | ||
![]() |
a90fc2ef2f | ||
![]() |
54302c11f9 | ||
![]() |
4db6c48dcd |
72
.gitignore
vendored
Normal file
72
.gitignore
vendored
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
out/
|
||||||
|
|
||||||
|
.DS_Store
|
||||||
|
|
||||||
|
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
|
||||||
|
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||||
|
|
||||||
|
# User-specific stuff
|
||||||
|
.idea/**/workspace.xml
|
||||||
|
.idea/**/tasks.xml
|
||||||
|
.idea/**/usage.statistics.xml
|
||||||
|
.idea/**/dictionaries
|
||||||
|
.idea/**/shelf
|
||||||
|
|
||||||
|
# Generated files
|
||||||
|
.idea/**/contentModel.xml
|
||||||
|
|
||||||
|
# Sensitive or high-churn files
|
||||||
|
.idea/**/dataSources/
|
||||||
|
.idea/**/dataSources.ids
|
||||||
|
.idea/**/dataSources.local.xml
|
||||||
|
.idea/**/sqlDataSources.xml
|
||||||
|
.idea/**/dynamic.xml
|
||||||
|
.idea/**/uiDesigner.xml
|
||||||
|
.idea/**/dbnavigator.xml
|
||||||
|
|
||||||
|
# Gradle
|
||||||
|
.idea/**/gradle.xml
|
||||||
|
.idea/**/libraries
|
||||||
|
|
||||||
|
# Gradle and Maven with auto-import
|
||||||
|
# When using Gradle or Maven with auto-import, you should exclude module files,
|
||||||
|
# since they will be recreated, and may cause churn. Uncomment if using
|
||||||
|
# auto-import.
|
||||||
|
# .idea/modules.xml
|
||||||
|
# .idea/*.iml
|
||||||
|
# .idea/modules
|
||||||
|
# *.iml
|
||||||
|
# *.ipr
|
||||||
|
|
||||||
|
# CMake
|
||||||
|
cmake-build-*/
|
||||||
|
|
||||||
|
# Mongo Explorer plugin
|
||||||
|
.idea/**/mongoSettings.xml
|
||||||
|
|
||||||
|
# File-based project format
|
||||||
|
*.iws
|
||||||
|
|
||||||
|
# IntelliJ
|
||||||
|
out/
|
||||||
|
|
||||||
|
# mpeltonen/sbt-idea plugin
|
||||||
|
.idea_modules/
|
||||||
|
|
||||||
|
# JIRA plugin
|
||||||
|
atlassian-ide-plugin.xml
|
||||||
|
|
||||||
|
# Cursive Clojure plugin
|
||||||
|
.idea/replstate.xml
|
||||||
|
|
||||||
|
# Crashlytics plugin (for Android Studio and IntelliJ)
|
||||||
|
com_crashlytics_export_strings.xml
|
||||||
|
crashlytics.properties
|
||||||
|
crashlytics-build.properties
|
||||||
|
fabric.properties
|
||||||
|
|
||||||
|
# Editor-based Rest Client
|
||||||
|
.idea/httpRequests
|
||||||
|
|
||||||
|
# Android studio 3.1+ serialized cache file
|
||||||
|
.idea/caches/build_file_checksums.ser
|
8
.idea/.gitignore
generated
vendored
Normal file
8
.idea/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# 默认忽略的文件
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
||||||
|
# 基于编辑器的 HTTP 客户端请求
|
||||||
|
/httpRequests/
|
||||||
|
# Datasource local storage ignored files
|
||||||
|
/dataSources/
|
||||||
|
/dataSources.local.xml
|
11
.idea/artifacts/StegSolve.xml
generated
Normal file
11
.idea/artifacts/StegSolve.xml
generated
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<component name="ArtifactManager">
|
||||||
|
<artifact type="jar" build-on-make="true" name="StegSolve">
|
||||||
|
<output-path>$PROJECT_DIR$/out/artifacts/StegSolve</output-path>
|
||||||
|
<root id="archive" name="StegSolve.jar">
|
||||||
|
<element id="directory" name="META-INF">
|
||||||
|
<element id="file-copy" path="$PROJECT_DIR$/META-INF/MANIFEST.MF" />
|
||||||
|
</element>
|
||||||
|
<element id="module-output" name="stegsolve" />
|
||||||
|
</root>
|
||||||
|
</artifact>
|
||||||
|
</component>
|
9
.idea/artifacts/stegsolve_jar.xml
generated
Normal file
9
.idea/artifacts/stegsolve_jar.xml
generated
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<component name="ArtifactManager">
|
||||||
|
<artifact type="jar" name="stegsolve:jar">
|
||||||
|
<output-path>$PROJECT_DIR$/out/artifacts/stegsolve_jar</output-path>
|
||||||
|
<root id="archive" name="stegsolve.jar">
|
||||||
|
<element id="module-output" name="stegsolve" />
|
||||||
|
<element id="extracted-dir" path="$USER_HOME$/Desktop/flatlaf-3.1.1.jar" path-in-jar="/" />
|
||||||
|
</root>
|
||||||
|
</artifact>
|
||||||
|
</component>
|
5
.idea/codeStyles/codeStyleConfig.xml
generated
Normal file
5
.idea/codeStyles/codeStyleConfig.xml
generated
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<component name="ProjectCodeStyleConfiguration">
|
||||||
|
<state>
|
||||||
|
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
|
||||||
|
</state>
|
||||||
|
</component>
|
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_1_8" project-jdk-name="jbrsdk_jcef-17" 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$/stegsolve.iml" filepath="$PROJECT_DIR$/stegsolve.iml" />
|
||||||
|
</modules>
|
||||||
|
</component>
|
||||||
|
</project>
|
7
.idea/vcs.xml
generated
Normal file
7
.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="" vcs="Git" />
|
||||||
|
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
@@ -1,7 +1,3 @@
|
|||||||
Manifest-Version: 1.0
|
Manifest-Version: 1.0
|
||||||
Ant-Version: Apache Ant 1.8.1
|
|
||||||
Created-By: 1.6.0_21-b07 (Sun Microsystems Inc.)
|
|
||||||
Main-Class: stegsolve.StegSolve
|
Main-Class: stegsolve.StegSolve
|
||||||
Class-Path:
|
|
||||||
X-COMMENT: Main-Class will be added automatically by build
|
|
||||||
|
|
||||||
|
23
README.md
Normal file
23
README.md
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
# StegSolve
|
||||||
|
|
||||||
|
StegSolve的升级修复版本!
|
||||||
|
|
||||||
|

|
||||||
|
## 1.5 changes
|
||||||
|
|
||||||
|
- 汉化部分内容
|
||||||
|
- 美化界面为Jetbrians风格
|
||||||
|
- 修复原来1.4版本的帧浏览器、合并图片等功能的不显示图片bug。
|
||||||
|
|
||||||
|
|
||||||
|
## 1.4 changes
|
||||||
|
|
||||||
|
- Added zoom to image
|
||||||
|
- Added drag&drop zone for files
|
||||||
|
- Added "all" option to channel planes in "Data Extract"
|
||||||
|
- Added horizontal scrolling (Shift+Mousewheel)
|
||||||
|
|
||||||
|
# Special Thanks
|
||||||
|
Special thanks to [JetBrains](https://www.jetbrains.com) for their support to this project.
|
||||||
|
|
||||||
|
[](https://www.jetbrains.com)
|
@@ -1,3 +1,9 @@
|
|||||||
|
Version 1.4
|
||||||
|
- Added zoom to image
|
||||||
|
- Added drag&drop zone for files
|
||||||
|
- Added "all" option to channel planes in "Data Extract"
|
||||||
|
- Added horizontal scrolling (Shift+Mousewheel)
|
||||||
|
|
||||||
Version 1.3
|
Version 1.3
|
||||||
1. Added a transform showing only the gray bits of an image.
|
1. Added a transform showing only the gray bits of an image.
|
||||||
2. CRC checks on PNGs now done, and correct CRC shown if wrong.
|
2. CRC checks on PNGs now done, and correct CRC shown if wrong.
|
12
stegsolve.iml
Normal file
12
stegsolve.iml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$" isTestSource="false" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="library" name="flatlaf-3.1.11" level="project" />
|
||||||
|
</component>
|
||||||
|
</module>
|
@@ -1,99 +0,0 @@
|
|||||||
<?xml version="1.1" encoding="UTF-8" ?>
|
|
||||||
|
|
||||||
<Form version="1.3" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JFrameFormInfo">
|
|
||||||
<Properties>
|
|
||||||
<Property name="defaultCloseOperation" type="int" value="2"/>
|
|
||||||
</Properties>
|
|
||||||
<SyntheticProperties>
|
|
||||||
<SyntheticProperty name="formSizePolicy" type="int" value="1"/>
|
|
||||||
</SyntheticProperties>
|
|
||||||
<AuxValues>
|
|
||||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
|
|
||||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
|
||||||
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
|
||||||
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
|
|
||||||
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
|
|
||||||
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
|
|
||||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
|
||||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
|
||||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
|
||||||
</AuxValues>
|
|
||||||
|
|
||||||
<Layout>
|
|
||||||
<DimensionLayout dim="0">
|
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
|
||||||
<Group type="102" alignment="0" attributes="0">
|
|
||||||
<EmptySpace min="-2" pref="168" max="-2" attributes="0"/>
|
|
||||||
<Component id="okButton" min="-2" max="-2" attributes="0"/>
|
|
||||||
<EmptySpace pref="227" max="32767" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
<Component id="aboutPanel" alignment="0" pref="444" max="32767" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
</DimensionLayout>
|
|
||||||
<DimensionLayout dim="1">
|
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
|
||||||
<Group type="102" alignment="1" attributes="0">
|
|
||||||
<Component id="aboutPanel" pref="311" max="32767" attributes="0"/>
|
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
|
||||||
<Component id="okButton" min="-2" max="-2" attributes="0"/>
|
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
</Group>
|
|
||||||
</DimensionLayout>
|
|
||||||
</Layout>
|
|
||||||
<SubComponents>
|
|
||||||
<Component class="javax.swing.JButton" name="okButton">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" value="OK"/>
|
|
||||||
<Property name="alignmentX" type="float" value="0.5"/>
|
|
||||||
</Properties>
|
|
||||||
<Events>
|
|
||||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="okButtonActionPerformed"/>
|
|
||||||
</Events>
|
|
||||||
</Component>
|
|
||||||
<Container class="javax.swing.JPanel" name="aboutPanel">
|
|
||||||
<Properties>
|
|
||||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[450, 300]"/>
|
|
||||||
</Property>
|
|
||||||
</Properties>
|
|
||||||
|
|
||||||
<Layout>
|
|
||||||
<DimensionLayout dim="0">
|
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
|
||||||
<Component id="jScrollPane1" alignment="0" pref="444" max="32767" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
</DimensionLayout>
|
|
||||||
<DimensionLayout dim="1">
|
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
|
||||||
<Component id="jScrollPane1" alignment="0" pref="311" max="32767" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
</DimensionLayout>
|
|
||||||
</Layout>
|
|
||||||
<SubComponents>
|
|
||||||
<Container class="javax.swing.JScrollPane" name="jScrollPane1">
|
|
||||||
<AuxValues>
|
|
||||||
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
|
|
||||||
</AuxValues>
|
|
||||||
|
|
||||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
|
||||||
<SubComponents>
|
|
||||||
<Component class="javax.swing.JEditorPane" name="jEditorPane1">
|
|
||||||
<Properties>
|
|
||||||
<Property name="contentType" type="java.lang.String" value="text/html"/>
|
|
||||||
<Property name="editable" type="boolean" value="false"/>
|
|
||||||
<Property name="text" type="java.lang.String" value="<html>
<center><b>Stegsolve v1.3 by Caesum</b></center>
<br>
Stegsolve is a stegano solver for challenges. It provides these main functions:
<ul>
<li>A quick view of different bit planes and some simple transformations.</li>
<li>Data extraction from planes. This can be row order or column order, with bits treated as a bitstream and converted into bytes.</li>
<li>Some simple checking of file formats and reporting on the filesize, additional bytes, file holes, etc. This is highly dependent upon the type of image.</li>
<li>Stereogram solver - simply change the offset until the image becomes visible.</li>
<li>Frame browser for animated images. This should also work for viewing layers in multi-layered PNG files.</li>
<li>Image combiner to combine two images in a variety of ways and browse through the different combinations.</li>
</ul>
<p>Copy/Cut and paste is available from most text using CTRL-C to copy, CTRL-V to paste and CTRL-X for cut.
<p>If an image fails to load, for example because it is corrupt, then file analysis will still open the file that you just tried to view. It may, however, crash out before reporting the information that you want to know. This will work though on images where the PNG has corrupted CRC values for example.
</html>
"/>
|
|
||||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[150, 150]"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[150, 150]"/>
|
|
||||||
</Property>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
</SubComponents>
|
|
||||||
</Container>
|
|
||||||
</SubComponents>
|
|
||||||
</Container>
|
|
||||||
</SubComponents>
|
|
||||||
</Form>
|
|
@@ -37,17 +37,13 @@ public class AboutFrame extends javax.swing.JFrame {
|
|||||||
|
|
||||||
okButton.setText("OK");
|
okButton.setText("OK");
|
||||||
okButton.setAlignmentX(0.5F);
|
okButton.setAlignmentX(0.5F);
|
||||||
okButton.addActionListener(new java.awt.event.ActionListener() {
|
okButton.addActionListener(this::okButtonActionPerformed);
|
||||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
||||||
okButtonActionPerformed(evt);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
aboutPanel.setPreferredSize(new java.awt.Dimension(450, 300));
|
aboutPanel.setPreferredSize(new java.awt.Dimension(450, 300));
|
||||||
|
|
||||||
jEditorPane1.setContentType("text/html");
|
jEditorPane1.setContentType("text/html");
|
||||||
jEditorPane1.setEditable(false);
|
jEditorPane1.setEditable(false);
|
||||||
jEditorPane1.setText("<html>\n<center><b>Stegsolve v1.3 by Caesum</b></center>\n<br>\nStegsolve is a stegano solver for challenges. It provides these main functions:\n<ul>\n<li>A quick view of different bit planes and some simple transformations.</li>\n<li>Data extraction from planes. This can be row order or column order, with bits treated as a bitstream and converted into bytes.</li>\n<li>Some simple checking of file formats and reporting on the filesize, additional bytes, file holes, etc. This is highly dependent upon the type of image.</li>\n<li>Stereogram solver - simply change the offset until the image becomes visible.</li>\n<li>Frame browser for animated images. This should also work for viewing layers in multi-layered PNG files.</li>\n<li>Image combiner to combine two images in a variety of ways and browse through the different combinations.</li>\n</ul>\n<p>Copy/Cut and paste is available from most text using CTRL-C to copy, CTRL-V to paste and CTRL-X for cut.\n<p>If an image fails to load, for example because it is corrupt, then file analysis will still open the file that you just tried to view. It may, however, crash out before reporting the information that you want to know. This will work though on images where the PNG has corrupted CRC values for example.\n</html>\n");
|
jEditorPane1.setText("<html>\n<center><b>Stegsolve v1.5 by Souno Inherited in Caesum<br>Mod by Giotino</b></center>\n<br>\nStegsolve is a stegano solver for challenges. It provides these main functions:\n<ul>\n<li>A quick view of different bit planes and some simple transformations.</li>\n<li>Data extraction from planes. This can be row order or column order, with bits treated as a bitstream and converted into bytes.</li>\n<li>Some simple checking of file formats and reporting on the filesize, additional bytes, file holes, etc. This is highly dependent upon the type of image.</li>\n<li>Stereogram solver - simply change the offset until the image becomes visible.</li>\n<li>Frame browser for animated images. This should also work for viewing layers in multi-layered PNG files.</li>\n<li>Image combiner to combine two images in a variety of ways and browse through the different combinations.</li>\n</ul>\n<p>Copy/Cut and paste is available from most text using CTRL-C to copy, CTRL-V to paste and CTRL-X for cut.\n<p>If an image fails to load, for example because it is corrupt, then file analysis will still open the file that you just tried to view. It may, however, crash out before reporting the information that you want to know. This will work though on images where the PNG has corrupted CRC values for example.\n</html>\n");
|
||||||
jEditorPane1.setMinimumSize(new java.awt.Dimension(150, 150));
|
jEditorPane1.setMinimumSize(new java.awt.Dimension(150, 150));
|
||||||
jEditorPane1.setPreferredSize(new java.awt.Dimension(150, 150));
|
jEditorPane1.setPreferredSize(new java.awt.Dimension(150, 150));
|
||||||
jScrollPane1.setViewportView(jEditorPane1);
|
jScrollPane1.setViewportView(jEditorPane1);
|
||||||
|
@@ -192,7 +192,7 @@ public class Combiner extends JFrame
|
|||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
JOptionPane.showMessageDialog(this, "Failed to write file: "+e.toString());
|
JOptionPane.showMessageDialog(this, "写入文件失败: "+e.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -222,8 +222,10 @@ public class Combiner extends JFrame
|
|||||||
dp.setPreferredSize(new Dimension(transform.getImage().getWidth(),transform.getImage().getHeight()));
|
dp.setPreferredSize(new Dimension(transform.getImage().getWidth(),transform.getImage().getHeight()));
|
||||||
this.setMaximumSize(getToolkit().getScreenSize());
|
this.setMaximumSize(getToolkit().getScreenSize());
|
||||||
pack();
|
pack();
|
||||||
|
dp.apply(100);
|
||||||
scrollPane.revalidate();
|
scrollPane.revalidate();
|
||||||
repaint();
|
repaint();
|
||||||
|
this.setSize(500, 600);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -5,8 +5,13 @@
|
|||||||
package stegsolve;
|
package stegsolve;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
|
import java.awt.datatransfer.DataFlavor;
|
||||||
|
import java.awt.datatransfer.Transferable;
|
||||||
|
import java.awt.dnd.*;
|
||||||
import java.awt.image.*;
|
import java.awt.image.*;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
import java.io.File;
|
||||||
|
import java.util.TooManyListenersException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A JPanel with an image attached to it
|
* A JPanel with an image attached to it
|
||||||
@@ -14,18 +19,25 @@ import java.awt.*;
|
|||||||
*/
|
*/
|
||||||
public class DPanel extends JPanel
|
public class DPanel extends JPanel
|
||||||
{
|
{
|
||||||
|
private Dimension preferredSize = new Dimension(200, 200);
|
||||||
|
private Dimension defaultSize = new Dimension();
|
||||||
|
private Dimension currentSize = new Dimension();
|
||||||
|
|
||||||
|
private DropTarget dropTarget;
|
||||||
|
private DropTargetHandler dropTargetHandler;
|
||||||
|
private Point dragPoint;
|
||||||
|
|
||||||
|
private boolean dragOver = false;
|
||||||
|
|
||||||
|
public DPanel() {
|
||||||
|
//setBackground(Color.RED);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The image attached to this panel
|
* The image attached to this panel
|
||||||
*/
|
*/
|
||||||
private BufferedImage bi = null;
|
private BufferedImage bi = null;
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
DPanel()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Overridden paint method for the panel which
|
* Overridden paint method for the panel which
|
||||||
* paints the image on the panel
|
* paints the image on the panel
|
||||||
@@ -35,7 +47,7 @@ public class DPanel extends JPanel
|
|||||||
protected void paintComponent(Graphics g) {
|
protected void paintComponent(Graphics g) {
|
||||||
super.paintComponent(g);
|
super.paintComponent(g);
|
||||||
if(bi!=null)
|
if(bi!=null)
|
||||||
g.drawImage(bi, 0, 0, this);
|
g.drawImage(bi, 0, 0, currentSize.width, currentSize.height, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -46,8 +58,148 @@ public class DPanel extends JPanel
|
|||||||
public void setImage(BufferedImage bix)
|
public void setImage(BufferedImage bix)
|
||||||
{
|
{
|
||||||
bi = bix;
|
bi = bix;
|
||||||
|
defaultSize.width = bi.getWidth();
|
||||||
|
defaultSize.height = bi.getHeight();
|
||||||
setSize(bi.getWidth(), bi.getHeight());
|
setSize(bi.getWidth(), bi.getHeight());
|
||||||
repaint();
|
repaint();
|
||||||
|
//apply(100);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Dimension getPreferredSize() {
|
||||||
|
return preferredSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void apply(int percent) {
|
||||||
|
currentSize.width = (int)(defaultSize.width * (((float)percent)/100));
|
||||||
|
currentSize.height = (int)(defaultSize.height * (((float)percent)/100));
|
||||||
|
preferredSize = currentSize;
|
||||||
|
revalidate();
|
||||||
|
repaint();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected class DropTargetHandler implements DropTargetListener {
|
||||||
|
|
||||||
|
protected void processDrag(DropTargetDragEvent dtde) {
|
||||||
|
if (dtde.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) {
|
||||||
|
dtde.acceptDrag(DnDConstants.ACTION_COPY);
|
||||||
|
} else {
|
||||||
|
dtde.rejectDrag();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void dragEnter(DropTargetDragEvent dtde) {
|
||||||
|
processDrag(dtde);
|
||||||
|
SwingUtilities.invokeLater(new DragUpdate(true, dtde.getLocation()));
|
||||||
|
repaint();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void dragOver(DropTargetDragEvent dtde) {
|
||||||
|
processDrag(dtde);
|
||||||
|
SwingUtilities.invokeLater(new DragUpdate(true, dtde.getLocation()));
|
||||||
|
repaint();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void dropActionChanged(DropTargetDragEvent dtde) {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void dragExit(DropTargetEvent dte) {
|
||||||
|
SwingUtilities.invokeLater(new DragUpdate(false, null));
|
||||||
|
repaint();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void drop(DropTargetDropEvent dtde) {
|
||||||
|
|
||||||
|
SwingUtilities.invokeLater(new DragUpdate(false, null));
|
||||||
|
|
||||||
|
Transferable transferable = dtde.getTransferable();
|
||||||
|
if (dtde.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) {
|
||||||
|
dtde.acceptDrop(dtde.getDropAction());
|
||||||
|
try {
|
||||||
|
java.util.List transferData = (java.util.List) transferable.getTransferData(DataFlavor.javaFileListFlavor);
|
||||||
|
|
||||||
|
if (transferData.size() == 1) {
|
||||||
|
StegSolve.that.loadImage((File)transferData.get(0));
|
||||||
|
dtde.dropComplete(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (Exception ex) {
|
||||||
|
ex.printStackTrace();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
dtde.rejectDrop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected DropTarget getMyDropTarget() {
|
||||||
|
if (dropTarget == null) {
|
||||||
|
dropTarget = new DropTarget(this, DnDConstants.ACTION_COPY_OR_MOVE, null);
|
||||||
|
}
|
||||||
|
return dropTarget;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected DropTargetHandler getDropTargetHandler() {
|
||||||
|
if (dropTargetHandler == null) {
|
||||||
|
dropTargetHandler = new DropTargetHandler();
|
||||||
|
}
|
||||||
|
return dropTargetHandler;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addNotify() {
|
||||||
|
super.addNotify();
|
||||||
|
try {
|
||||||
|
getMyDropTarget().addDropTargetListener(getDropTargetHandler());
|
||||||
|
} catch (TooManyListenersException ex) {
|
||||||
|
ex.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void removeNotify() {
|
||||||
|
super.removeNotify();
|
||||||
|
getMyDropTarget().removeDropTargetListener(getDropTargetHandler());
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
@Override
|
||||||
|
protected void paintComponent(Graphics g) {
|
||||||
|
super.paintComponent(g);
|
||||||
|
if (dragOver) {
|
||||||
|
Graphics2D g2d = (Graphics2D) g.create();
|
||||||
|
g2d.setColor(new Color(0, 255, 0, 64));
|
||||||
|
g2d.fill(new Rectangle(getWidth(), getHeight()));
|
||||||
|
if (dragPoint != null && target != null) {
|
||||||
|
int x = dragPoint.x - 12;
|
||||||
|
int y = dragPoint.y - 12;
|
||||||
|
g2d.drawImage(target, x, y, this);
|
||||||
|
}
|
||||||
|
g2d.dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class DragUpdate implements Runnable {
|
||||||
|
|
||||||
|
private boolean dragOver;
|
||||||
|
private Point dragPoint;
|
||||||
|
|
||||||
|
public DragUpdate(boolean dragOver, Point dragPoint) {
|
||||||
|
this.dragOver = dragOver;
|
||||||
|
this.dragPoint = dragPoint;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
DPanel.this.dragOver = dragOver;
|
||||||
|
DPanel.this.dragPoint = dragPoint;
|
||||||
|
DPanel.this.repaint();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,752 +0,0 @@
|
|||||||
<?xml version="1.1" encoding="UTF-8" ?>
|
|
||||||
|
|
||||||
<Form version="1.3" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JFrameFormInfo">
|
|
||||||
<NonVisualComponents>
|
|
||||||
<Component class="javax.swing.ButtonGroup" name="byGroup">
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.ButtonGroup" name="bitGroup">
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.ButtonGroup" name="planeGroup">
|
|
||||||
</Component>
|
|
||||||
</NonVisualComponents>
|
|
||||||
<Properties>
|
|
||||||
<Property name="defaultCloseOperation" type="int" value="2"/>
|
|
||||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[720, 560]"/>
|
|
||||||
</Property>
|
|
||||||
</Properties>
|
|
||||||
<SyntheticProperties>
|
|
||||||
<SyntheticProperty name="formSizePolicy" type="int" value="1"/>
|
|
||||||
</SyntheticProperties>
|
|
||||||
<AuxValues>
|
|
||||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
|
|
||||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
|
||||||
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
|
||||||
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
|
|
||||||
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
|
|
||||||
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
|
|
||||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
|
||||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
|
||||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
|
||||||
<AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,-31,0,0,3,32"/>
|
|
||||||
</AuxValues>
|
|
||||||
|
|
||||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout">
|
|
||||||
<Property name="horizontalGap" type="int" value="5"/>
|
|
||||||
<Property name="verticalGap" type="int" value="5"/>
|
|
||||||
</Layout>
|
|
||||||
<SubComponents>
|
|
||||||
<Container class="javax.swing.JPanel" name="optionsPanel">
|
|
||||||
<Properties>
|
|
||||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[720, 280]"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[720, 280]"/>
|
|
||||||
</Property>
|
|
||||||
</Properties>
|
|
||||||
<AccessibilityProperties>
|
|
||||||
<Property name="AccessibleContext.accessibleName" type="java.lang.String" value="saveText"/>
|
|
||||||
</AccessibilityProperties>
|
|
||||||
<Constraints>
|
|
||||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
|
||||||
<BorderConstraints direction="Center"/>
|
|
||||||
</Constraint>
|
|
||||||
</Constraints>
|
|
||||||
|
|
||||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
|
|
||||||
<SubComponents>
|
|
||||||
<Container class="javax.swing.JPanel" name="lhSettingsPanel">
|
|
||||||
<Properties>
|
|
||||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[360, 280]"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[360, 280]"/>
|
|
||||||
</Property>
|
|
||||||
</Properties>
|
|
||||||
<Constraints>
|
|
||||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
|
||||||
<BorderConstraints direction="Center"/>
|
|
||||||
</Constraint>
|
|
||||||
</Constraints>
|
|
||||||
|
|
||||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/>
|
|
||||||
<SubComponents>
|
|
||||||
<Container class="javax.swing.JPanel" name="bitPlanesPanel">
|
|
||||||
<Properties>
|
|
||||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
|
||||||
<Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
|
|
||||||
<TitledBorder title="Bit Planes"/>
|
|
||||||
</Border>
|
|
||||||
</Property>
|
|
||||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[360, 200]"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[360, 200]"/>
|
|
||||||
</Property>
|
|
||||||
</Properties>
|
|
||||||
|
|
||||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/>
|
|
||||||
<SubComponents>
|
|
||||||
<Container class="javax.swing.JPanel" name="alphaBitPanel">
|
|
||||||
<Properties>
|
|
||||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[100, 33]"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="name" type="java.lang.String" value="alphaBitPanel" noResource="true"/>
|
|
||||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[350, 34]"/>
|
|
||||||
</Property>
|
|
||||||
</Properties>
|
|
||||||
<AccessibilityProperties>
|
|
||||||
<Property name="AccessibleContext.accessibleName" type="java.lang.String" value="alphaBitPanel"/>
|
|
||||||
</AccessibilityProperties>
|
|
||||||
|
|
||||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/>
|
|
||||||
<SubComponents>
|
|
||||||
<Component class="javax.swing.JLabel" name="alphaLabel">
|
|
||||||
<Properties>
|
|
||||||
<Property name="horizontalAlignment" type="int" value="0"/>
|
|
||||||
<Property name="text" type="java.lang.String" value="Alpha"/>
|
|
||||||
<Property name="horizontalTextPosition" type="int" value="0"/>
|
|
||||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[40, 14]"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[40, 14]"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[40, 14]"/>
|
|
||||||
</Property>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JCheckBox" name="ab7">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" value="7"/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JCheckBox" name="ab6">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" value="6"/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JCheckBox" name="ab5">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" value="5"/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JCheckBox" name="ab4">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" value="4"/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JCheckBox" name="ab3">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" value="3"/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JCheckBox" name="ab2">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" value="2"/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JCheckBox" name="ab1">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" value="1"/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JCheckBox" name="ab0">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" value="0"/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
</SubComponents>
|
|
||||||
</Container>
|
|
||||||
<Container class="javax.swing.JPanel" name="redBitPanel">
|
|
||||||
<Properties>
|
|
||||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[100, 33]"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[350, 34]"/>
|
|
||||||
</Property>
|
|
||||||
</Properties>
|
|
||||||
|
|
||||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/>
|
|
||||||
<SubComponents>
|
|
||||||
<Component class="javax.swing.JLabel" name="redLabel">
|
|
||||||
<Properties>
|
|
||||||
<Property name="horizontalAlignment" type="int" value="0"/>
|
|
||||||
<Property name="text" type="java.lang.String" value="Red"/>
|
|
||||||
<Property name="horizontalTextPosition" type="int" value="0"/>
|
|
||||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[40, 14]"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[40, 14]"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[40, 14]"/>
|
|
||||||
</Property>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JCheckBox" name="rb7">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" value="7"/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JCheckBox" name="rb6">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" value="6"/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JCheckBox" name="rb5">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" value="5"/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JCheckBox" name="rb4">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" value="4"/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JCheckBox" name="rb3">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" value="3"/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JCheckBox" name="rb2">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" value="2"/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JCheckBox" name="rb1">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" value="1"/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JCheckBox" name="rb0">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" value="0"/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
</SubComponents>
|
|
||||||
</Container>
|
|
||||||
<Container class="javax.swing.JPanel" name="greenBitPanel">
|
|
||||||
<Properties>
|
|
||||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[100, 33]"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[350, 34]"/>
|
|
||||||
</Property>
|
|
||||||
</Properties>
|
|
||||||
|
|
||||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/>
|
|
||||||
<SubComponents>
|
|
||||||
<Component class="javax.swing.JLabel" name="greenLabel">
|
|
||||||
<Properties>
|
|
||||||
<Property name="horizontalAlignment" type="int" value="0"/>
|
|
||||||
<Property name="text" type="java.lang.String" value="Green"/>
|
|
||||||
<Property name="horizontalTextPosition" type="int" value="0"/>
|
|
||||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[40, 14]"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[40, 14]"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[40, 14]"/>
|
|
||||||
</Property>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JCheckBox" name="gb7">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" value="7"/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JCheckBox" name="gb6">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" value="6"/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JCheckBox" name="gb5">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" value="5"/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JCheckBox" name="gb4">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" value="4"/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JCheckBox" name="gb3">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" value="3"/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JCheckBox" name="gb2">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" value="2"/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JCheckBox" name="gb1">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" value="1"/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JCheckBox" name="gb0">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" value="0"/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
</SubComponents>
|
|
||||||
</Container>
|
|
||||||
<Container class="javax.swing.JPanel" name="blueBitPanel">
|
|
||||||
<Properties>
|
|
||||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[100, 33]"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[350, 34]"/>
|
|
||||||
</Property>
|
|
||||||
</Properties>
|
|
||||||
|
|
||||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/>
|
|
||||||
<SubComponents>
|
|
||||||
<Component class="javax.swing.JLabel" name="blueLabel">
|
|
||||||
<Properties>
|
|
||||||
<Property name="horizontalAlignment" type="int" value="0"/>
|
|
||||||
<Property name="text" type="java.lang.String" value="Blue"/>
|
|
||||||
<Property name="horizontalTextPosition" type="int" value="0"/>
|
|
||||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[40, 14]"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[40, 14]"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[40, 14]"/>
|
|
||||||
</Property>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JCheckBox" name="bb7">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" value="7"/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JCheckBox" name="bb6">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" value="6"/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JCheckBox" name="bb5">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" value="5"/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JCheckBox" name="bb4">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" value="4"/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JCheckBox" name="bb3">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" value="3"/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JCheckBox" name="bb2">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" value="2"/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JCheckBox" name="bb1">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" value="1"/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JCheckBox" name="bb0">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" value="0"/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
</SubComponents>
|
|
||||||
</Container>
|
|
||||||
</SubComponents>
|
|
||||||
</Container>
|
|
||||||
<Container class="javax.swing.JPanel" name="prevSettingsPanel">
|
|
||||||
<Properties>
|
|
||||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
|
||||||
<Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
|
|
||||||
<TitledBorder title="Preview Settings"/>
|
|
||||||
</Border>
|
|
||||||
</Property>
|
|
||||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[360, 50]"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[360, 50]"/>
|
|
||||||
</Property>
|
|
||||||
</Properties>
|
|
||||||
|
|
||||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout">
|
|
||||||
<Property name="verticalGap" type="int" value="0"/>
|
|
||||||
</Layout>
|
|
||||||
<SubComponents>
|
|
||||||
<Component class="javax.swing.JLabel" name="hdLabel">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" value="Include Hex Dump In Preview"/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JCheckBox" name="hdInclude">
|
|
||||||
<Properties>
|
|
||||||
<Property name="selected" type="boolean" value="true"/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
</SubComponents>
|
|
||||||
</Container>
|
|
||||||
</SubComponents>
|
|
||||||
</Container>
|
|
||||||
<Container class="javax.swing.JPanel" name="rhSettingsPanel">
|
|
||||||
<Properties>
|
|
||||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[300, 280]"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[300, 280]"/>
|
|
||||||
</Property>
|
|
||||||
</Properties>
|
|
||||||
<Constraints>
|
|
||||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
|
||||||
<BorderConstraints direction="East"/>
|
|
||||||
</Constraint>
|
|
||||||
</Constraints>
|
|
||||||
|
|
||||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout">
|
|
||||||
<Property name="horizontalGap" type="int" value="0"/>
|
|
||||||
</Layout>
|
|
||||||
<SubComponents>
|
|
||||||
<Container class="javax.swing.JPanel" name="orderSettingsPanel">
|
|
||||||
<Properties>
|
|
||||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
|
||||||
<Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
|
|
||||||
<TitledBorder title="Order settings"/>
|
|
||||||
</Border>
|
|
||||||
</Property>
|
|
||||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[300, 260]"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[300, 260]"/>
|
|
||||||
</Property>
|
|
||||||
</Properties>
|
|
||||||
|
|
||||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout">
|
|
||||||
<Property name="alignment" type="int" value="0"/>
|
|
||||||
</Layout>
|
|
||||||
<SubComponents>
|
|
||||||
<Container class="javax.swing.JPanel" name="extractByPanel">
|
|
||||||
|
|
||||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/>
|
|
||||||
<SubComponents>
|
|
||||||
<Component class="javax.swing.JLabel" name="extractByLabel">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" value="Extract By"/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JRadioButton" name="byRowButton">
|
|
||||||
<Properties>
|
|
||||||
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
|
|
||||||
<ComponentRef name="byGroup"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="selected" type="boolean" value="true"/>
|
|
||||||
<Property name="text" type="java.lang.String" value="Row"/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JRadioButton" name="byColumnButton">
|
|
||||||
<Properties>
|
|
||||||
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
|
|
||||||
<ComponentRef name="byGroup"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="text" type="java.lang.String" value="Column"/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
</SubComponents>
|
|
||||||
</Container>
|
|
||||||
<Container class="javax.swing.JPanel" name="bitOrderPanel">
|
|
||||||
<Properties>
|
|
||||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[240, 41]"/>
|
|
||||||
</Property>
|
|
||||||
</Properties>
|
|
||||||
|
|
||||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout">
|
|
||||||
<Property name="alignment" type="int" value="0"/>
|
|
||||||
</Layout>
|
|
||||||
<SubComponents>
|
|
||||||
<Component class="javax.swing.JLabel" name="bitOrderLabel">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" value="Bit Order"/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JRadioButton" name="MSBButton">
|
|
||||||
<Properties>
|
|
||||||
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
|
|
||||||
<ComponentRef name="bitGroup"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="selected" type="boolean" value="true"/>
|
|
||||||
<Property name="text" type="java.lang.String" value="MSB First"/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JRadioButton" name="LSBButton">
|
|
||||||
<Properties>
|
|
||||||
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
|
|
||||||
<ComponentRef name="bitGroup"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="text" type="java.lang.String" value="LSB First"/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
</SubComponents>
|
|
||||||
</Container>
|
|
||||||
<Container class="javax.swing.JPanel" name="bitPlaneOrderPanel">
|
|
||||||
<Properties>
|
|
||||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[200, 120]"/>
|
|
||||||
</Property>
|
|
||||||
</Properties>
|
|
||||||
|
|
||||||
<Layout>
|
|
||||||
<DimensionLayout dim="0">
|
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
|
||||||
<Group type="102" alignment="0" attributes="0">
|
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
|
||||||
<Component id="bitPlaneOrderLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
|
||||||
<Group type="102" alignment="0" attributes="0">
|
|
||||||
<EmptySpace min="10" pref="10" max="10" attributes="0"/>
|
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
|
||||||
<Group type="102" alignment="0" attributes="0">
|
|
||||||
<Component id="RBGButton" min="-2" max="-2" attributes="0"/>
|
|
||||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
|
||||||
<Component id="BRGButton" min="-2" max="-2" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
<Group type="102" alignment="0" attributes="0">
|
|
||||||
<Component id="RGBButton" min="-2" max="-2" attributes="0"/>
|
|
||||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
|
||||||
<Component id="GRBButton" min="-2" max="-2" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
<Group type="102" alignment="0" attributes="0">
|
|
||||||
<Component id="GBRButton" min="-2" max="-2" attributes="0"/>
|
|
||||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
|
||||||
<Component id="BGRButton" min="-2" max="-2" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
</Group>
|
|
||||||
</Group>
|
|
||||||
</Group>
|
|
||||||
<EmptySpace pref="72" max="32767" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
</Group>
|
|
||||||
</DimensionLayout>
|
|
||||||
<DimensionLayout dim="1">
|
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
|
||||||
<Group type="102" alignment="0" attributes="0">
|
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
|
||||||
<Component id="bitPlaneOrderLabel" min="-2" max="-2" attributes="0"/>
|
|
||||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
|
||||||
<Group type="103" groupAlignment="3" attributes="0">
|
|
||||||
<Component id="RGBButton" alignment="3" min="-2" max="-2" attributes="0"/>
|
|
||||||
<Component id="GRBButton" alignment="3" min="-2" max="-2" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
|
||||||
<Group type="103" groupAlignment="3" attributes="0">
|
|
||||||
<Component id="RBGButton" alignment="3" min="-2" max="-2" attributes="0"/>
|
|
||||||
<Component id="BRGButton" alignment="3" min="-2" max="-2" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
|
||||||
<Group type="103" groupAlignment="3" attributes="0">
|
|
||||||
<Component id="GBRButton" alignment="3" min="-2" max="-2" attributes="0"/>
|
|
||||||
<Component id="BGRButton" alignment="3" min="-2" max="-2" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
<EmptySpace pref="13" max="32767" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
</Group>
|
|
||||||
</DimensionLayout>
|
|
||||||
</Layout>
|
|
||||||
<SubComponents>
|
|
||||||
<Component class="javax.swing.JLabel" name="bitPlaneOrderLabel">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" value="Bit Plane Order"/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JRadioButton" name="RGBButton">
|
|
||||||
<Properties>
|
|
||||||
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
|
|
||||||
<ComponentRef name="planeGroup"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="selected" type="boolean" value="true"/>
|
|
||||||
<Property name="text" type="java.lang.String" value="RGB"/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JRadioButton" name="RBGButton">
|
|
||||||
<Properties>
|
|
||||||
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
|
|
||||||
<ComponentRef name="planeGroup"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="text" type="java.lang.String" value="RBG"/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JRadioButton" name="GBRButton">
|
|
||||||
<Properties>
|
|
||||||
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
|
|
||||||
<ComponentRef name="planeGroup"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="text" type="java.lang.String" value="GBR"/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JRadioButton" name="GRBButton">
|
|
||||||
<Properties>
|
|
||||||
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
|
|
||||||
<ComponentRef name="planeGroup"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="text" type="java.lang.String" value="GRB"/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JRadioButton" name="BRGButton">
|
|
||||||
<Properties>
|
|
||||||
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
|
|
||||||
<ComponentRef name="planeGroup"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="text" type="java.lang.String" value="BRG"/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JRadioButton" name="BGRButton">
|
|
||||||
<Properties>
|
|
||||||
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
|
|
||||||
<ComponentRef name="planeGroup"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="text" type="java.lang.String" value="BGR"/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
</SubComponents>
|
|
||||||
</Container>
|
|
||||||
</SubComponents>
|
|
||||||
</Container>
|
|
||||||
</SubComponents>
|
|
||||||
</Container>
|
|
||||||
</SubComponents>
|
|
||||||
</Container>
|
|
||||||
<Container class="javax.swing.JPanel" name="exPreviewPanel">
|
|
||||||
<Constraints>
|
|
||||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
|
||||||
<BorderConstraints direction="North"/>
|
|
||||||
</Constraint>
|
|
||||||
</Constraints>
|
|
||||||
|
|
||||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
|
|
||||||
<SubComponents>
|
|
||||||
<Component class="javax.swing.JLabel" name="exPreviewLabel">
|
|
||||||
<Properties>
|
|
||||||
<Property name="horizontalAlignment" type="int" value="0"/>
|
|
||||||
<Property name="text" type="java.lang.String" value="Extract Preview"/>
|
|
||||||
<Property name="horizontalTextPosition" type="int" value="0"/>
|
|
||||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[20, 14]"/>
|
|
||||||
</Property>
|
|
||||||
</Properties>
|
|
||||||
<AccessibilityProperties>
|
|
||||||
<Property name="AccessibleContext.accessibleName" type="java.lang.String" value="previewLabel"/>
|
|
||||||
</AccessibilityProperties>
|
|
||||||
<Constraints>
|
|
||||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
|
||||||
<BorderConstraints direction="Center"/>
|
|
||||||
</Constraint>
|
|
||||||
</Constraints>
|
|
||||||
</Component>
|
|
||||||
<Container class="javax.swing.JScrollPane" name="jScrollPane1">
|
|
||||||
<AuxValues>
|
|
||||||
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
|
|
||||||
</AuxValues>
|
|
||||||
<Constraints>
|
|
||||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
|
||||||
<BorderConstraints direction="Last"/>
|
|
||||||
</Constraint>
|
|
||||||
</Constraints>
|
|
||||||
|
|
||||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
|
||||||
<SubComponents>
|
|
||||||
<Component class="javax.swing.JTextArea" name="jPreview">
|
|
||||||
<Properties>
|
|
||||||
<Property name="columns" type="int" value="20"/>
|
|
||||||
<Property name="editable" type="boolean" value="false"/>
|
|
||||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
|
||||||
<Font name="Courier New" size="14" style="0"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="rows" type="int" value="10"/>
|
|
||||||
<Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
|
|
||||||
<Insets value="[5, 5, 5, 5]"/>
|
|
||||||
</Property>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
</SubComponents>
|
|
||||||
</Container>
|
|
||||||
</SubComponents>
|
|
||||||
</Container>
|
|
||||||
<Container class="javax.swing.JPanel" name="buttonsPanel">
|
|
||||||
<Constraints>
|
|
||||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
|
||||||
<BorderConstraints direction="South"/>
|
|
||||||
</Constraint>
|
|
||||||
</Constraints>
|
|
||||||
|
|
||||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/>
|
|
||||||
<SubComponents>
|
|
||||||
<Component class="javax.swing.JButton" name="previewButton">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" value="Preview"/>
|
|
||||||
</Properties>
|
|
||||||
<AccessibilityProperties>
|
|
||||||
<Property name="AccessibleContext.accessibleName" type="java.lang.String" value="previewButton"/>
|
|
||||||
</AccessibilityProperties>
|
|
||||||
<Events>
|
|
||||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="previewButtonActionPerformed"/>
|
|
||||||
</Events>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JButton" name="saveTextButton">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" value="Save Text"/>
|
|
||||||
</Properties>
|
|
||||||
<AccessibilityProperties>
|
|
||||||
<Property name="AccessibleContext.accessibleName" type="java.lang.String" value="saveTextButton"/>
|
|
||||||
</AccessibilityProperties>
|
|
||||||
<Events>
|
|
||||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="saveTextButtonActionPerformed"/>
|
|
||||||
</Events>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JButton" name="saveBinButton">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" value="Save Bin"/>
|
|
||||||
</Properties>
|
|
||||||
<AccessibilityProperties>
|
|
||||||
<Property name="AccessibleContext.accessibleName" type="java.lang.String" value="saveBinButton"/>
|
|
||||||
</AccessibilityProperties>
|
|
||||||
<Events>
|
|
||||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="saveBinButtonActionPerformed"/>
|
|
||||||
</Events>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JButton" name="cancelButton">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" value="Cancel"/>
|
|
||||||
</Properties>
|
|
||||||
<AccessibilityProperties>
|
|
||||||
<Property name="AccessibleContext.accessibleName" type="java.lang.String" value="cancelButton"/>
|
|
||||||
</AccessibilityProperties>
|
|
||||||
<Events>
|
|
||||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="cancelButtonActionPerformed"/>
|
|
||||||
</Events>
|
|
||||||
</Component>
|
|
||||||
</SubComponents>
|
|
||||||
</Container>
|
|
||||||
</SubComponents>
|
|
||||||
</Form>
|
|
@@ -6,6 +6,8 @@
|
|||||||
|
|
||||||
package stegsolve;
|
package stegsolve;
|
||||||
|
|
||||||
|
import java.awt.event.ItemEvent;
|
||||||
|
import java.awt.event.ItemListener;
|
||||||
import java.awt.image.*;
|
import java.awt.image.*;
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
@@ -402,6 +404,7 @@ public class Extract extends javax.swing.JFrame {
|
|||||||
bitPlanesPanel = new javax.swing.JPanel();
|
bitPlanesPanel = new javax.swing.JPanel();
|
||||||
alphaBitPanel = new javax.swing.JPanel();
|
alphaBitPanel = new javax.swing.JPanel();
|
||||||
alphaLabel = new javax.swing.JLabel();
|
alphaLabel = new javax.swing.JLabel();
|
||||||
|
aba = new javax.swing.JCheckBox();
|
||||||
ab7 = new javax.swing.JCheckBox();
|
ab7 = new javax.swing.JCheckBox();
|
||||||
ab6 = new javax.swing.JCheckBox();
|
ab6 = new javax.swing.JCheckBox();
|
||||||
ab5 = new javax.swing.JCheckBox();
|
ab5 = new javax.swing.JCheckBox();
|
||||||
@@ -412,6 +415,7 @@ public class Extract extends javax.swing.JFrame {
|
|||||||
ab0 = new javax.swing.JCheckBox();
|
ab0 = new javax.swing.JCheckBox();
|
||||||
redBitPanel = new javax.swing.JPanel();
|
redBitPanel = new javax.swing.JPanel();
|
||||||
redLabel = new javax.swing.JLabel();
|
redLabel = new javax.swing.JLabel();
|
||||||
|
rba = new javax.swing.JCheckBox();
|
||||||
rb7 = new javax.swing.JCheckBox();
|
rb7 = new javax.swing.JCheckBox();
|
||||||
rb6 = new javax.swing.JCheckBox();
|
rb6 = new javax.swing.JCheckBox();
|
||||||
rb5 = new javax.swing.JCheckBox();
|
rb5 = new javax.swing.JCheckBox();
|
||||||
@@ -422,6 +426,7 @@ public class Extract extends javax.swing.JFrame {
|
|||||||
rb0 = new javax.swing.JCheckBox();
|
rb0 = new javax.swing.JCheckBox();
|
||||||
greenBitPanel = new javax.swing.JPanel();
|
greenBitPanel = new javax.swing.JPanel();
|
||||||
greenLabel = new javax.swing.JLabel();
|
greenLabel = new javax.swing.JLabel();
|
||||||
|
gba = new javax.swing.JCheckBox();
|
||||||
gb7 = new javax.swing.JCheckBox();
|
gb7 = new javax.swing.JCheckBox();
|
||||||
gb6 = new javax.swing.JCheckBox();
|
gb6 = new javax.swing.JCheckBox();
|
||||||
gb5 = new javax.swing.JCheckBox();
|
gb5 = new javax.swing.JCheckBox();
|
||||||
@@ -432,6 +437,7 @@ public class Extract extends javax.swing.JFrame {
|
|||||||
gb0 = new javax.swing.JCheckBox();
|
gb0 = new javax.swing.JCheckBox();
|
||||||
blueBitPanel = new javax.swing.JPanel();
|
blueBitPanel = new javax.swing.JPanel();
|
||||||
blueLabel = new javax.swing.JLabel();
|
blueLabel = new javax.swing.JLabel();
|
||||||
|
bba = new javax.swing.JCheckBox();
|
||||||
bb7 = new javax.swing.JCheckBox();
|
bb7 = new javax.swing.JCheckBox();
|
||||||
bb6 = new javax.swing.JCheckBox();
|
bb6 = new javax.swing.JCheckBox();
|
||||||
bb5 = new javax.swing.JCheckBox();
|
bb5 = new javax.swing.JCheckBox();
|
||||||
@@ -472,7 +478,7 @@ public class Extract extends javax.swing.JFrame {
|
|||||||
cancelButton = new javax.swing.JButton();
|
cancelButton = new javax.swing.JButton();
|
||||||
|
|
||||||
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
|
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
|
||||||
setMinimumSize(new java.awt.Dimension(720, 560));
|
setMinimumSize(new java.awt.Dimension(790, 560));
|
||||||
getContentPane().setLayout(new java.awt.BorderLayout(5, 5));
|
getContentPane().setLayout(new java.awt.BorderLayout(5, 5));
|
||||||
|
|
||||||
optionsPanel.setMinimumSize(new java.awt.Dimension(720, 280));
|
optionsPanel.setMinimumSize(new java.awt.Dimension(720, 280));
|
||||||
@@ -482,13 +488,14 @@ public class Extract extends javax.swing.JFrame {
|
|||||||
lhSettingsPanel.setMinimumSize(new java.awt.Dimension(360, 280));
|
lhSettingsPanel.setMinimumSize(new java.awt.Dimension(360, 280));
|
||||||
lhSettingsPanel.setPreferredSize(new java.awt.Dimension(360, 280));
|
lhSettingsPanel.setPreferredSize(new java.awt.Dimension(360, 280));
|
||||||
|
|
||||||
bitPlanesPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Bit Planes"));
|
int bitPlanesWidth = 480;
|
||||||
bitPlanesPanel.setMinimumSize(new java.awt.Dimension(360, 200));
|
|
||||||
bitPlanesPanel.setPreferredSize(new java.awt.Dimension(360, 200));
|
bitPlanesPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Bit Planes"));
|
||||||
|
bitPlanesPanel.setMinimumSize(new java.awt.Dimension(bitPlanesWidth, 200));
|
||||||
|
bitPlanesPanel.setPreferredSize(new java.awt.Dimension(bitPlanesWidth, 200));
|
||||||
|
|
||||||
alphaBitPanel.setMinimumSize(new java.awt.Dimension(100, 33));
|
|
||||||
alphaBitPanel.setName("alphaBitPanel"); // NOI18N
|
alphaBitPanel.setName("alphaBitPanel"); // NOI18N
|
||||||
alphaBitPanel.setPreferredSize(new java.awt.Dimension(350, 34));
|
alphaBitPanel.setPreferredSize(new java.awt.Dimension(bitPlanesWidth-10, 34));
|
||||||
|
|
||||||
alphaLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
alphaLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
||||||
alphaLabel.setText("Alpha");
|
alphaLabel.setText("Alpha");
|
||||||
@@ -498,6 +505,11 @@ public class Extract extends javax.swing.JFrame {
|
|||||||
alphaLabel.setPreferredSize(new java.awt.Dimension(40, 14));
|
alphaLabel.setPreferredSize(new java.awt.Dimension(40, 14));
|
||||||
alphaBitPanel.add(alphaLabel);
|
alphaBitPanel.add(alphaLabel);
|
||||||
|
|
||||||
|
aba.setText("all");
|
||||||
|
alphaBitPanel.add(aba);
|
||||||
|
|
||||||
|
checkAllListener(aba, ab7, ab6, ab5, ab4, ab3, ab2, ab1, ab0);
|
||||||
|
|
||||||
ab7.setText("7");
|
ab7.setText("7");
|
||||||
alphaBitPanel.add(ab7);
|
alphaBitPanel.add(ab7);
|
||||||
|
|
||||||
@@ -525,8 +537,7 @@ public class Extract extends javax.swing.JFrame {
|
|||||||
bitPlanesPanel.add(alphaBitPanel);
|
bitPlanesPanel.add(alphaBitPanel);
|
||||||
alphaBitPanel.getAccessibleContext().setAccessibleName("alphaBitPanel");
|
alphaBitPanel.getAccessibleContext().setAccessibleName("alphaBitPanel");
|
||||||
|
|
||||||
redBitPanel.setMinimumSize(new java.awt.Dimension(100, 33));
|
redBitPanel.setPreferredSize(new java.awt.Dimension(bitPlanesWidth-10, 34));
|
||||||
redBitPanel.setPreferredSize(new java.awt.Dimension(350, 34));
|
|
||||||
|
|
||||||
redLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
redLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
||||||
redLabel.setText("Red");
|
redLabel.setText("Red");
|
||||||
@@ -536,6 +547,11 @@ public class Extract extends javax.swing.JFrame {
|
|||||||
redLabel.setPreferredSize(new java.awt.Dimension(40, 14));
|
redLabel.setPreferredSize(new java.awt.Dimension(40, 14));
|
||||||
redBitPanel.add(redLabel);
|
redBitPanel.add(redLabel);
|
||||||
|
|
||||||
|
rba.setText("all");
|
||||||
|
redBitPanel.add(rba);
|
||||||
|
|
||||||
|
checkAllListener(rba, rb7, rb6, rb5, rb4, rb3, rb2, rb1, rb0);
|
||||||
|
|
||||||
rb7.setText("7");
|
rb7.setText("7");
|
||||||
redBitPanel.add(rb7);
|
redBitPanel.add(rb7);
|
||||||
|
|
||||||
@@ -562,8 +578,7 @@ public class Extract extends javax.swing.JFrame {
|
|||||||
|
|
||||||
bitPlanesPanel.add(redBitPanel);
|
bitPlanesPanel.add(redBitPanel);
|
||||||
|
|
||||||
greenBitPanel.setMinimumSize(new java.awt.Dimension(100, 33));
|
greenBitPanel.setPreferredSize(new java.awt.Dimension(bitPlanesWidth-10, 34));
|
||||||
greenBitPanel.setPreferredSize(new java.awt.Dimension(350, 34));
|
|
||||||
|
|
||||||
greenLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
greenLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
||||||
greenLabel.setText("Green");
|
greenLabel.setText("Green");
|
||||||
@@ -573,6 +588,11 @@ public class Extract extends javax.swing.JFrame {
|
|||||||
greenLabel.setPreferredSize(new java.awt.Dimension(40, 14));
|
greenLabel.setPreferredSize(new java.awt.Dimension(40, 14));
|
||||||
greenBitPanel.add(greenLabel);
|
greenBitPanel.add(greenLabel);
|
||||||
|
|
||||||
|
gba.setText("all");
|
||||||
|
greenBitPanel.add(gba);
|
||||||
|
|
||||||
|
checkAllListener(gba, gb7, gb6, gb5, gb4, gb3, gb2, gb1, gb0);
|
||||||
|
|
||||||
gb7.setText("7");
|
gb7.setText("7");
|
||||||
greenBitPanel.add(gb7);
|
greenBitPanel.add(gb7);
|
||||||
|
|
||||||
@@ -599,8 +619,7 @@ public class Extract extends javax.swing.JFrame {
|
|||||||
|
|
||||||
bitPlanesPanel.add(greenBitPanel);
|
bitPlanesPanel.add(greenBitPanel);
|
||||||
|
|
||||||
blueBitPanel.setMinimumSize(new java.awt.Dimension(100, 33));
|
blueBitPanel.setPreferredSize(new java.awt.Dimension(bitPlanesWidth-10, 34));
|
||||||
blueBitPanel.setPreferredSize(new java.awt.Dimension(350, 34));
|
|
||||||
|
|
||||||
blueLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
blueLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
||||||
blueLabel.setText("Blue");
|
blueLabel.setText("Blue");
|
||||||
@@ -610,6 +629,11 @@ public class Extract extends javax.swing.JFrame {
|
|||||||
blueLabel.setPreferredSize(new java.awt.Dimension(40, 14));
|
blueLabel.setPreferredSize(new java.awt.Dimension(40, 14));
|
||||||
blueBitPanel.add(blueLabel);
|
blueBitPanel.add(blueLabel);
|
||||||
|
|
||||||
|
bba.setText("all");
|
||||||
|
blueBitPanel.add(bba);
|
||||||
|
|
||||||
|
checkAllListener(bba, bb7, bb6, bb5, bb4, bb3, bb2, bb1, bb0);
|
||||||
|
|
||||||
bb7.setText("7");
|
bb7.setText("7");
|
||||||
blueBitPanel.add(bb7);
|
blueBitPanel.add(bb7);
|
||||||
|
|
||||||
@@ -658,8 +682,7 @@ public class Extract extends javax.swing.JFrame {
|
|||||||
rhSettingsPanel.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.CENTER, 0, 5));
|
rhSettingsPanel.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.CENTER, 0, 5));
|
||||||
|
|
||||||
orderSettingsPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Order settings"));
|
orderSettingsPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Order settings"));
|
||||||
orderSettingsPanel.setMinimumSize(new java.awt.Dimension(300, 260));
|
orderSettingsPanel.setPreferredSize(new java.awt.Dimension(280, 260));
|
||||||
orderSettingsPanel.setPreferredSize(new java.awt.Dimension(300, 260));
|
|
||||||
orderSettingsPanel.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));
|
orderSettingsPanel.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));
|
||||||
|
|
||||||
extractByLabel.setText("Extract By");
|
extractByLabel.setText("Extract By");
|
||||||
@@ -676,7 +699,7 @@ public class Extract extends javax.swing.JFrame {
|
|||||||
|
|
||||||
orderSettingsPanel.add(extractByPanel);
|
orderSettingsPanel.add(extractByPanel);
|
||||||
|
|
||||||
bitOrderPanel.setPreferredSize(new java.awt.Dimension(240, 41));
|
bitOrderPanel.setPreferredSize(new java.awt.Dimension(250, 41));
|
||||||
bitOrderPanel.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));
|
bitOrderPanel.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));
|
||||||
|
|
||||||
bitOrderLabel.setText("Bit Order");
|
bitOrderLabel.setText("Bit Order");
|
||||||
@@ -693,7 +716,7 @@ public class Extract extends javax.swing.JFrame {
|
|||||||
|
|
||||||
orderSettingsPanel.add(bitOrderPanel);
|
orderSettingsPanel.add(bitOrderPanel);
|
||||||
|
|
||||||
bitPlaneOrderPanel.setPreferredSize(new java.awt.Dimension(200, 120));
|
bitPlaneOrderPanel.setPreferredSize(new java.awt.Dimension(250, 130));
|
||||||
|
|
||||||
bitPlaneOrderLabel.setText("Bit Plane Order");
|
bitPlaneOrderLabel.setText("Bit Plane Order");
|
||||||
|
|
||||||
@@ -831,6 +854,19 @@ public class Extract extends javax.swing.JFrame {
|
|||||||
pack();
|
pack();
|
||||||
}// </editor-fold>//GEN-END:initComponents
|
}// </editor-fold>//GEN-END:initComponents
|
||||||
|
|
||||||
|
private void checkAllListener(JCheckBox ca, JCheckBox c7, JCheckBox c6, JCheckBox c5, JCheckBox c4, JCheckBox c3, JCheckBox c2, JCheckBox c1, JCheckBox c0) {
|
||||||
|
ca.addItemListener(e -> {
|
||||||
|
c7.setSelected(ca.isSelected());
|
||||||
|
c6.setSelected(ca.isSelected());
|
||||||
|
c5.setSelected(ca.isSelected());
|
||||||
|
c4.setSelected(ca.isSelected());
|
||||||
|
c3.setSelected(ca.isSelected());
|
||||||
|
c2.setSelected(ca.isSelected());
|
||||||
|
c1.setSelected(ca.isSelected());
|
||||||
|
c0.setSelected(ca.isSelected());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate the extract and generate the preview
|
* Generate the extract and generate the preview
|
||||||
* @param evt Event
|
* @param evt Event
|
||||||
@@ -885,6 +921,7 @@ public class Extract extends javax.swing.JFrame {
|
|||||||
private javax.swing.JCheckBox ab5;
|
private javax.swing.JCheckBox ab5;
|
||||||
private javax.swing.JCheckBox ab6;
|
private javax.swing.JCheckBox ab6;
|
||||||
private javax.swing.JCheckBox ab7;
|
private javax.swing.JCheckBox ab7;
|
||||||
|
private javax.swing.JCheckBox aba;
|
||||||
private javax.swing.JPanel alphaBitPanel;
|
private javax.swing.JPanel alphaBitPanel;
|
||||||
private javax.swing.JLabel alphaLabel;
|
private javax.swing.JLabel alphaLabel;
|
||||||
private javax.swing.JCheckBox bb0;
|
private javax.swing.JCheckBox bb0;
|
||||||
@@ -895,6 +932,7 @@ public class Extract extends javax.swing.JFrame {
|
|||||||
private javax.swing.JCheckBox bb5;
|
private javax.swing.JCheckBox bb5;
|
||||||
private javax.swing.JCheckBox bb6;
|
private javax.swing.JCheckBox bb6;
|
||||||
private javax.swing.JCheckBox bb7;
|
private javax.swing.JCheckBox bb7;
|
||||||
|
private javax.swing.JCheckBox bba;
|
||||||
private javax.swing.ButtonGroup bitGroup;
|
private javax.swing.ButtonGroup bitGroup;
|
||||||
private javax.swing.JLabel bitOrderLabel;
|
private javax.swing.JLabel bitOrderLabel;
|
||||||
private javax.swing.JPanel bitOrderPanel;
|
private javax.swing.JPanel bitOrderPanel;
|
||||||
@@ -920,6 +958,7 @@ public class Extract extends javax.swing.JFrame {
|
|||||||
private javax.swing.JCheckBox gb5;
|
private javax.swing.JCheckBox gb5;
|
||||||
private javax.swing.JCheckBox gb6;
|
private javax.swing.JCheckBox gb6;
|
||||||
private javax.swing.JCheckBox gb7;
|
private javax.swing.JCheckBox gb7;
|
||||||
|
private javax.swing.JCheckBox gba;
|
||||||
private javax.swing.JPanel greenBitPanel;
|
private javax.swing.JPanel greenBitPanel;
|
||||||
private javax.swing.JLabel greenLabel;
|
private javax.swing.JLabel greenLabel;
|
||||||
private javax.swing.JCheckBox hdInclude;
|
private javax.swing.JCheckBox hdInclude;
|
||||||
@@ -940,6 +979,7 @@ public class Extract extends javax.swing.JFrame {
|
|||||||
private javax.swing.JCheckBox rb5;
|
private javax.swing.JCheckBox rb5;
|
||||||
private javax.swing.JCheckBox rb6;
|
private javax.swing.JCheckBox rb6;
|
||||||
private javax.swing.JCheckBox rb7;
|
private javax.swing.JCheckBox rb7;
|
||||||
|
private javax.swing.JCheckBox rba;
|
||||||
private javax.swing.JPanel redBitPanel;
|
private javax.swing.JPanel redBitPanel;
|
||||||
private javax.swing.JLabel redLabel;
|
private javax.swing.JLabel redLabel;
|
||||||
private javax.swing.JPanel rhSettingsPanel;
|
private javax.swing.JPanel rhSettingsPanel;
|
||||||
|
@@ -1,110 +0,0 @@
|
|||||||
<?xml version="1.1" encoding="UTF-8" ?>
|
|
||||||
|
|
||||||
<Form version="1.3" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JFrameFormInfo">
|
|
||||||
<Properties>
|
|
||||||
<Property name="defaultCloseOperation" type="int" value="2"/>
|
|
||||||
<Property name="title" type="java.lang.String" value="File Format Analysis"/>
|
|
||||||
</Properties>
|
|
||||||
<SyntheticProperties>
|
|
||||||
<SyntheticProperty name="formSizePolicy" type="int" value="1"/>
|
|
||||||
</SyntheticProperties>
|
|
||||||
<AuxValues>
|
|
||||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
|
|
||||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
|
||||||
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
|
||||||
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
|
|
||||||
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
|
|
||||||
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
|
|
||||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
|
||||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
|
||||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
|
||||||
<AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,79,0,0,3,47"/>
|
|
||||||
</AuxValues>
|
|
||||||
|
|
||||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
|
|
||||||
<SubComponents>
|
|
||||||
<Container class="javax.swing.JPanel" name="jPanel1">
|
|
||||||
<Properties>
|
|
||||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[400, 300]"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[400, 350]"/>
|
|
||||||
</Property>
|
|
||||||
</Properties>
|
|
||||||
<Constraints>
|
|
||||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
|
||||||
<BorderConstraints direction="Center"/>
|
|
||||||
</Constraint>
|
|
||||||
</Constraints>
|
|
||||||
|
|
||||||
<Layout>
|
|
||||||
<DimensionLayout dim="0">
|
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
|
||||||
<Component id="jScrollPane1" alignment="0" pref="815" max="32767" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
</DimensionLayout>
|
|
||||||
<DimensionLayout dim="1">
|
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
|
||||||
<Component id="jScrollPane1" alignment="0" pref="300" max="32767" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
</DimensionLayout>
|
|
||||||
</Layout>
|
|
||||||
<SubComponents>
|
|
||||||
<Container class="javax.swing.JScrollPane" name="jScrollPane1">
|
|
||||||
<Properties>
|
|
||||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[400, 260]"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[400, 260]"/>
|
|
||||||
</Property>
|
|
||||||
</Properties>
|
|
||||||
<AuxValues>
|
|
||||||
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
|
|
||||||
</AuxValues>
|
|
||||||
|
|
||||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
|
||||||
<SubComponents>
|
|
||||||
<Component class="javax.swing.JEditorPane" name="report">
|
|
||||||
<Properties>
|
|
||||||
<Property name="contentType" type="java.lang.String" value="text/html"/>
|
|
||||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
|
||||||
<Font name="Courier New" size="14" style="0"/>
|
|
||||||
</Property>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
</SubComponents>
|
|
||||||
</Container>
|
|
||||||
</SubComponents>
|
|
||||||
</Container>
|
|
||||||
<Container class="javax.swing.JPanel" name="jPanel2">
|
|
||||||
<Properties>
|
|
||||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[400, 35]"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[400, 35]"/>
|
|
||||||
</Property>
|
|
||||||
</Properties>
|
|
||||||
<Constraints>
|
|
||||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
|
||||||
<BorderConstraints direction="South"/>
|
|
||||||
</Constraint>
|
|
||||||
</Constraints>
|
|
||||||
|
|
||||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/>
|
|
||||||
<SubComponents>
|
|
||||||
<Component class="javax.swing.JButton" name="OKButton">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" value="OK"/>
|
|
||||||
<Property name="horizontalTextPosition" type="int" value="0"/>
|
|
||||||
</Properties>
|
|
||||||
<Events>
|
|
||||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="OKButtonActionPerformed"/>
|
|
||||||
</Events>
|
|
||||||
</Component>
|
|
||||||
</SubComponents>
|
|
||||||
</Container>
|
|
||||||
</SubComponents>
|
|
||||||
</Form>
|
|
@@ -39,9 +39,9 @@ public class FileAnalysis extends javax.swing.JFrame {
|
|||||||
{
|
{
|
||||||
rep = new StringBuilder();
|
rep = new StringBuilder();
|
||||||
rep.append("<html><center><b>");
|
rep.append("<html><center><b>");
|
||||||
rep.append("File format report");
|
rep.append("文件格式报告");
|
||||||
rep.append("</b></center>");
|
rep.append("</b></center>");
|
||||||
rep.append(("<br>File: "+ifile.getName()));
|
rep.append(("<br>文件: "+ifile.getName()));
|
||||||
try{
|
try{
|
||||||
FileInputStream fis = new FileInputStream(ifile);
|
FileInputStream fis = new FileInputStream(ifile);
|
||||||
f = new byte[(int)ifile.length()];
|
f = new byte[(int)ifile.length()];
|
||||||
@@ -51,7 +51,7 @@ public class FileAnalysis extends javax.swing.JFrame {
|
|||||||
}
|
}
|
||||||
catch(Exception e)
|
catch(Exception e)
|
||||||
{
|
{
|
||||||
rep.append(("Error reading file: "+e.toString()));
|
rep.append(("读取文件时出错: "+e.toString()));
|
||||||
}
|
}
|
||||||
rep.append("</html>");
|
rep.append("</html>");
|
||||||
report.setText(rep.toString());
|
report.setText(rep.toString());
|
||||||
@@ -66,7 +66,7 @@ public class FileAnalysis extends javax.swing.JFrame {
|
|||||||
// analyse f, write report to rep
|
// analyse f, write report to rep
|
||||||
if(f.length<4)
|
if(f.length<4)
|
||||||
{
|
{
|
||||||
rep.append("<br>file too short?");
|
rep.append("<br>文件太短?");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(f[0] == 'B' && f[1] == 'M')
|
if(f[0] == 'B' && f[1] == 'M')
|
||||||
@@ -78,7 +78,7 @@ public class FileAnalysis extends javax.swing.JFrame {
|
|||||||
analyse_gif();
|
analyse_gif();
|
||||||
else if(f[0]==(byte)0xff && f[1]==(byte)0xd8)
|
else if(f[0]==(byte)0xff && f[1]==(byte)0xd8)
|
||||||
analyse_jpg();
|
analyse_jpg();
|
||||||
else rep.append("<br>File format analysis code not done yet!");
|
else rep.append("<br>文件格式分析代码尚未完成!");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -90,8 +90,8 @@ public class FileAnalysis extends javax.swing.JFrame {
|
|||||||
cpos = analyse_jpg_sections(cpos);
|
cpos = analyse_jpg_sections(cpos);
|
||||||
if(cpos<f.length)
|
if(cpos<f.length)
|
||||||
{
|
{
|
||||||
rep.append(("<br>Additional bytes at end of file = " +(f.length-cpos)));
|
rep.append(("<br>文件末尾的附加字节数 = " +(f.length-cpos)));
|
||||||
rep.append("<br>Dump of additional bytes:");
|
rep.append("<br>转储附加字节:");
|
||||||
fdump(cpos, f.length);
|
fdump(cpos, f.length);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -105,12 +105,12 @@ public class FileAnalysis extends javax.swing.JFrame {
|
|||||||
{
|
{
|
||||||
if(f[pos]==(byte)0xff && f[pos+1]==(byte)0xd8)
|
if(f[pos]==(byte)0xff && f[pos+1]==(byte)0xd8)
|
||||||
{
|
{
|
||||||
rep.append("<br>Start of Image");
|
rep.append("<br>图像的开头");
|
||||||
pos+=2;
|
pos+=2;
|
||||||
}
|
}
|
||||||
else if(f[pos] == (byte) 0xff && f[pos + 1] == (byte) 0xd9)
|
else if(f[pos] == (byte) 0xff && f[pos + 1] == (byte) 0xd9)
|
||||||
{
|
{
|
||||||
rep.append("<br><br>End of Image");
|
rep.append("<br><br>图像结尾");
|
||||||
pos+=2;
|
pos+=2;
|
||||||
return pos;
|
return pos;
|
||||||
}
|
}
|
||||||
@@ -932,7 +932,7 @@ public class FileAnalysis extends javax.swing.JFrame {
|
|||||||
OKButton = new javax.swing.JButton();
|
OKButton = new javax.swing.JButton();
|
||||||
|
|
||||||
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
|
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
|
||||||
setTitle("File Format Analysis");
|
setTitle("文件格式分析");
|
||||||
|
|
||||||
jPanel1.setMinimumSize(new java.awt.Dimension(400, 300));
|
jPanel1.setMinimumSize(new java.awt.Dimension(400, 300));
|
||||||
jPanel1.setPreferredSize(new java.awt.Dimension(400, 350));
|
jPanel1.setPreferredSize(new java.awt.Dimension(400, 350));
|
||||||
@@ -941,7 +941,7 @@ public class FileAnalysis extends javax.swing.JFrame {
|
|||||||
jScrollPane1.setPreferredSize(new java.awt.Dimension(400, 260));
|
jScrollPane1.setPreferredSize(new java.awt.Dimension(400, 260));
|
||||||
|
|
||||||
report.setContentType("text/html");
|
report.setContentType("text/html");
|
||||||
report.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N
|
report.setFont(new java.awt.Font("微软雅黑", 0, 14)); // NOI18N
|
||||||
jScrollPane1.setViewportView(report);
|
jScrollPane1.setViewportView(report);
|
||||||
|
|
||||||
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
|
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
|
||||||
@@ -960,7 +960,7 @@ public class FileAnalysis extends javax.swing.JFrame {
|
|||||||
jPanel2.setMinimumSize(new java.awt.Dimension(400, 35));
|
jPanel2.setMinimumSize(new java.awt.Dimension(400, 35));
|
||||||
jPanel2.setPreferredSize(new java.awt.Dimension(400, 35));
|
jPanel2.setPreferredSize(new java.awt.Dimension(400, 35));
|
||||||
|
|
||||||
OKButton.setText("OK");
|
OKButton.setText("确认");
|
||||||
OKButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
|
OKButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
|
||||||
OKButton.addActionListener(new java.awt.event.ActionListener() {
|
OKButton.addActionListener(new java.awt.event.ActionListener() {
|
||||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||||
|
@@ -97,7 +97,7 @@ public class FrameBrowser extends JFrame
|
|||||||
frames.add(bnext);
|
frames.add(bnext);
|
||||||
numframes++;
|
numframes++;
|
||||||
}
|
}
|
||||||
System.out.println("total frames " + numframes);
|
System.out.println("总帧数 " + numframes);
|
||||||
}
|
}
|
||||||
catch (IOException e)
|
catch (IOException e)
|
||||||
{
|
{
|
||||||
@@ -253,8 +253,10 @@ public class FrameBrowser extends JFrame
|
|||||||
dp.setPreferredSize(new Dimension(bi.getWidth(),bi.getHeight()));
|
dp.setPreferredSize(new Dimension(bi.getWidth(),bi.getHeight()));
|
||||||
this.setMaximumSize(getToolkit().getScreenSize());
|
this.setMaximumSize(getToolkit().getScreenSize());
|
||||||
pack();
|
pack();
|
||||||
|
dp.apply(100);
|
||||||
scrollPane.revalidate();
|
scrollPane.revalidate();
|
||||||
repaint();
|
repaint();
|
||||||
|
this.setSize(500, 600);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -7,6 +7,9 @@
|
|||||||
package stegsolve;
|
package stegsolve;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
|
import javax.swing.border.Border;
|
||||||
|
import javax.swing.event.ChangeEvent;
|
||||||
|
import javax.swing.event.ChangeListener;
|
||||||
import javax.swing.filechooser.*;
|
import javax.swing.filechooser.*;
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.awt.image.*;
|
import java.awt.image.*;
|
||||||
@@ -19,10 +22,11 @@ import java.awt.*;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* StegSolve
|
* StegSolve
|
||||||
|
*
|
||||||
* @author Caesum
|
* @author Caesum
|
||||||
*/
|
*/
|
||||||
public class StegSolve extends JFrame
|
public class StegSolve extends JFrame {
|
||||||
{
|
static StegSolve that;
|
||||||
/**
|
/**
|
||||||
* Menu option - about
|
* Menu option - about
|
||||||
*/
|
*/
|
||||||
@@ -83,6 +87,7 @@ public class StegSolve extends JFrame
|
|||||||
* panel for buttons
|
* panel for buttons
|
||||||
*/
|
*/
|
||||||
private JPanel buttonPanel;
|
private JPanel buttonPanel;
|
||||||
|
private ZoomSlider zoomSlider;
|
||||||
/**
|
/**
|
||||||
* Next frame button
|
* Next frame button
|
||||||
*/
|
*/
|
||||||
@@ -113,15 +118,16 @@ public class StegSolve extends JFrame
|
|||||||
*/
|
*/
|
||||||
private Transform transform = null;
|
private Transform transform = null;
|
||||||
|
|
||||||
/** Creates new form stegsolve */
|
/**
|
||||||
public StegSolve()
|
* Creates new form stegsolve
|
||||||
{
|
*/
|
||||||
|
private StegSolve() {
|
||||||
|
that = this;
|
||||||
initComponents();
|
initComponents();
|
||||||
}
|
}
|
||||||
|
|
||||||
// <editor-fold defaultstate="collapsed" desc="Initcomponents()">
|
// <editor-fold defaultstate="collapsed" desc="Initcomponents()">
|
||||||
private void initComponents() {
|
private void initComponents() {
|
||||||
|
|
||||||
menuBar = new JMenuBar();
|
menuBar = new JMenuBar();
|
||||||
menuFile = new JMenu();
|
menuFile = new JMenu();
|
||||||
fileOpen = new JMenuItem();
|
fileOpen = new JMenuItem();
|
||||||
@@ -139,89 +145,53 @@ public class StegSolve extends JFrame
|
|||||||
|
|
||||||
setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
|
setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
|
||||||
|
|
||||||
menuFile.setText("File");
|
menuFile.setText("文件");
|
||||||
|
|
||||||
fileOpen.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, 0));
|
fileOpen.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, 0));
|
||||||
fileOpen.setText("Open");
|
fileOpen.setText("打开");
|
||||||
fileOpen.addActionListener(new ActionListener() {
|
fileOpen.addActionListener(this::fileOpenActionPerformed);
|
||||||
public void actionPerformed(ActionEvent evt) {
|
|
||||||
fileOpenActionPerformed(evt);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
menuFile.add(fileOpen);
|
menuFile.add(fileOpen);
|
||||||
|
|
||||||
fileSave.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S, 0));
|
fileSave.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S, 0));
|
||||||
fileSave.setText("Save As");
|
fileSave.setText("另存为");
|
||||||
fileSave.addActionListener(new ActionListener() {
|
fileSave.addActionListener(this::fileSaveActionPerformed);
|
||||||
public void actionPerformed(ActionEvent evt) {
|
|
||||||
fileSaveActionPerformed(evt);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
menuFile.add(fileSave);
|
menuFile.add(fileSave);
|
||||||
|
|
||||||
fileExit.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_X, 0));
|
fileExit.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_X, 0));
|
||||||
fileExit.setText("Exit");
|
fileExit.setText("退出");
|
||||||
fileExit.addActionListener(new ActionListener() {
|
fileExit.addActionListener(this::fileExitActionPerformed);
|
||||||
public void actionPerformed(ActionEvent evt) {
|
|
||||||
fileExitActionPerformed(evt);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
menuFile.add(fileExit);
|
menuFile.add(fileExit);
|
||||||
|
|
||||||
menuBar.add(menuFile);
|
menuBar.add(menuFile);
|
||||||
|
|
||||||
menuAnalyse.setText("Analyse");
|
menuAnalyse.setText("分析");
|
||||||
|
|
||||||
analyseFormat.setText("File Format");
|
analyseFormat.setText("文件格式");
|
||||||
analyseFormat.addActionListener(new ActionListener() {
|
analyseFormat.addActionListener(this::analyseFormatActionPerformed);
|
||||||
public void actionPerformed(ActionEvent evt) {
|
|
||||||
analyseFormatActionPerformed(evt);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
menuAnalyse.add(analyseFormat);
|
menuAnalyse.add(analyseFormat);
|
||||||
|
|
||||||
analyseExtract.setText("Data Extract");
|
analyseExtract.setText("数据提取");
|
||||||
analyseExtract.addActionListener(new ActionListener() {
|
analyseExtract.addActionListener(this::analyseExtractActionPerformed);
|
||||||
public void actionPerformed(ActionEvent evt) {
|
|
||||||
analyseExtractActionPerformed(evt);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
menuAnalyse.add(analyseExtract);
|
menuAnalyse.add(analyseExtract);
|
||||||
|
|
||||||
stereoSolve.setText("Stereogram Solver");
|
stereoSolve.setText("立体视图");
|
||||||
stereoSolve.addActionListener(new ActionListener() {
|
stereoSolve.addActionListener(this::stereoSolveActionPerformed);
|
||||||
public void actionPerformed(ActionEvent evt) {
|
|
||||||
stereoSolveActionPerformed(evt);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
menuAnalyse.add(stereoSolve);
|
menuAnalyse.add(stereoSolve);
|
||||||
|
|
||||||
frameBrowse.setText("Frame Browser");
|
frameBrowse.setText("帧浏览器");
|
||||||
frameBrowse.addActionListener(new ActionListener() {
|
frameBrowse.addActionListener(this::frameBrowseActionPerformed);
|
||||||
public void actionPerformed(ActionEvent evt) {
|
|
||||||
frameBrowseActionPerformed(evt);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
menuAnalyse.add(frameBrowse);
|
menuAnalyse.add(frameBrowse);
|
||||||
|
|
||||||
imageCombine.setText("Image Combiner");
|
imageCombine.setText("图像合成器");
|
||||||
imageCombine.addActionListener(new ActionListener() {
|
imageCombine.addActionListener(this::imageCombineActionPerformed);
|
||||||
public void actionPerformed(ActionEvent evt) {
|
|
||||||
imageCombineActionPerformed(evt);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
menuAnalyse.add(imageCombine);
|
menuAnalyse.add(imageCombine);
|
||||||
|
|
||||||
menuBar.add(menuAnalyse);
|
menuBar.add(menuAnalyse);
|
||||||
|
|
||||||
menuHelp.setText("Help");
|
menuHelp.setText("帮助");
|
||||||
|
|
||||||
about.setText("About");
|
about.setText("关于");
|
||||||
about.addActionListener(new ActionListener() {
|
about.addActionListener(this::aboutActionPerformed);
|
||||||
public void actionPerformed(ActionEvent evt) {
|
|
||||||
aboutActionPerformed(evt);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
menuHelp.add(about);
|
menuHelp.add(about);
|
||||||
|
|
||||||
menuBar.add(menuHelp);
|
menuBar.add(menuHelp);
|
||||||
@@ -230,43 +200,80 @@ public class StegSolve extends JFrame
|
|||||||
|
|
||||||
setLayout(new BorderLayout());
|
setLayout(new BorderLayout());
|
||||||
|
|
||||||
this.add(nowShowing, BorderLayout.NORTH);
|
JPanel textZoom = new JPanel();
|
||||||
|
textZoom.setLayout(new BorderLayout());
|
||||||
|
|
||||||
|
textZoom.add(nowShowing, BorderLayout.NORTH);
|
||||||
|
|
||||||
buttonPanel = new JPanel();
|
buttonPanel = new JPanel();
|
||||||
backwardButton = new JButton("<");
|
backwardButton = new JButton("<");
|
||||||
backwardButton.addActionListener(new ActionListener() {
|
backwardButton.addActionListener(this::backwardButtonActionPerformed);
|
||||||
public void actionPerformed(ActionEvent evt) {
|
|
||||||
backwardButtonActionPerformed(evt);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
forwardButton = new JButton(">");
|
forwardButton = new JButton(">");
|
||||||
forwardButton.addActionListener(new ActionListener() {
|
forwardButton.addActionListener(this::forwardButtonActionPerformed);
|
||||||
public void actionPerformed(ActionEvent evt) {
|
|
||||||
forwardButtonActionPerformed(evt);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
buttonPanel.add(backwardButton);
|
buttonPanel.add(backwardButton);
|
||||||
buttonPanel.add(forwardButton);
|
buttonPanel.add(forwardButton);
|
||||||
|
|
||||||
add(buttonPanel, BorderLayout.SOUTH);
|
add(buttonPanel, BorderLayout.SOUTH);
|
||||||
|
|
||||||
|
zoomSlider = new ZoomSlider(10, 1000, 100);
|
||||||
|
|
||||||
|
zoomSlider.addChangeListener(v -> {
|
||||||
|
dp.apply(v);
|
||||||
|
dp.revalidate();
|
||||||
|
});
|
||||||
|
|
||||||
|
textZoom.add(zoomSlider, BorderLayout.SOUTH);
|
||||||
|
|
||||||
|
add(textZoom, BorderLayout.NORTH);
|
||||||
|
|
||||||
dp = new DPanel();
|
dp = new DPanel();
|
||||||
scrollPane = new JScrollPane(dp);
|
scrollPane = new JScrollPane(dp);
|
||||||
|
|
||||||
|
//Horizontal scrolling
|
||||||
|
JFrame frame = this;
|
||||||
|
frame.addKeyListener(new KeyListener() {
|
||||||
|
@Override
|
||||||
|
public void keyPressed(KeyEvent e) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
if (e.isShiftDown()) {
|
||||||
|
frame.addMouseWheelListener(arg01 -> {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
scrollPane.getHorizontalScrollBar().setValue(scrollPane.getHorizontalScrollBar().getValue() + arg01.getWheelRotation());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void keyReleased(KeyEvent e) {
|
||||||
|
if (!e.isShiftDown()) {
|
||||||
|
frame.removeMouseWheelListener(frame.getMouseWheelListeners()[0]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void keyTyped(KeyEvent e) {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
add(scrollPane, BorderLayout.CENTER);
|
add(scrollPane, BorderLayout.CENTER);
|
||||||
|
|
||||||
backwardButton.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT,0), "back");
|
backwardButton.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, 0), "back");
|
||||||
backwardButton.getActionMap().put("back", backButtonPress);
|
backwardButton.getActionMap().put("back", backButtonPress);
|
||||||
forwardButton.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT,0), "forward");
|
forwardButton.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, 0), "forward");
|
||||||
forwardButton.getActionMap().put("forward", forwardButtonPress);
|
forwardButton.getActionMap().put("forward", forwardButtonPress);
|
||||||
|
|
||||||
this.setTitle("StegSolve 1.3 by Caesum");
|
this.setTitle("StegSolve 1.5 by Souno (龙腾四季专版)");
|
||||||
this.setMaximumSize(getToolkit().getScreenSize());
|
this.setMaximumSize(getToolkit().getScreenSize());
|
||||||
|
|
||||||
pack();
|
pack();
|
||||||
|
|
||||||
|
this.setSize(800, 600);
|
||||||
//setResizable(false);
|
//setResizable(false);
|
||||||
}// </editor-fold>
|
}// </editor-fold>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Close the form on file exit
|
* Close the form on file exit
|
||||||
|
*
|
||||||
* @param evt Event
|
* @param evt Event
|
||||||
*/
|
*/
|
||||||
private void fileExitActionPerformed(ActionEvent evt) {
|
private void fileExitActionPerformed(ActionEvent evt) {
|
||||||
@@ -276,18 +283,19 @@ public class StegSolve extends JFrame
|
|||||||
/**
|
/**
|
||||||
* This is used to map the left arrow key to the back button
|
* This is used to map the left arrow key to the back button
|
||||||
*/
|
*/
|
||||||
private Action backButtonPress = new AbstractAction()
|
private Action backButtonPress = new AbstractAction() {
|
||||||
{
|
public void actionPerformed(ActionEvent e) {
|
||||||
public void actionPerformed(ActionEvent e)
|
backwardButtonActionPerformed(e);
|
||||||
{ backwardButtonActionPerformed(e);}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Move back by one image
|
* Move back by one image
|
||||||
|
*
|
||||||
* @param evt Event
|
* @param evt Event
|
||||||
*/
|
*/
|
||||||
private void backwardButtonActionPerformed(ActionEvent evt) {
|
private void backwardButtonActionPerformed(ActionEvent evt) {
|
||||||
if(transform == null) return;
|
if (transform == null) return;
|
||||||
transform.back();
|
transform.back();
|
||||||
updateImage();
|
updateImage();
|
||||||
}
|
}
|
||||||
@@ -295,24 +303,26 @@ public class StegSolve extends JFrame
|
|||||||
/**
|
/**
|
||||||
* This is used to map the right arrow key to the forward button
|
* This is used to map the right arrow key to the forward button
|
||||||
*/
|
*/
|
||||||
private Action forwardButtonPress = new AbstractAction()
|
private Action forwardButtonPress = new AbstractAction() {
|
||||||
{
|
public void actionPerformed(ActionEvent e) {
|
||||||
public void actionPerformed(ActionEvent e)
|
forwardButtonActionPerformed(e);
|
||||||
{ forwardButtonActionPerformed(e);}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Move forward by one image
|
* Move forward by one image
|
||||||
|
*
|
||||||
* @param evt Event
|
* @param evt Event
|
||||||
*/
|
*/
|
||||||
private void forwardButtonActionPerformed(ActionEvent evt) {
|
private void forwardButtonActionPerformed(ActionEvent evt) {
|
||||||
if(bi == null) return;
|
if (bi == null) return;
|
||||||
transform.forward();
|
transform.forward();
|
||||||
updateImage();
|
updateImage();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show the help/about frame
|
* Show the help/about frame
|
||||||
|
*
|
||||||
* @param evt Event
|
* @param evt Event
|
||||||
*/
|
*/
|
||||||
private void aboutActionPerformed(ActionEvent evt) {
|
private void aboutActionPerformed(ActionEvent evt) {
|
||||||
@@ -321,6 +331,7 @@ public class StegSolve extends JFrame
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Open the file format analyser
|
* Open the file format analyser
|
||||||
|
*
|
||||||
* @param evt Event
|
* @param evt Event
|
||||||
*/
|
*/
|
||||||
private void analyseFormatActionPerformed(ActionEvent evt) {
|
private void analyseFormatActionPerformed(ActionEvent evt) {
|
||||||
@@ -329,6 +340,7 @@ public class StegSolve extends JFrame
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Open the stereogram solver
|
* Open the stereogram solver
|
||||||
|
*
|
||||||
* @param evt Event
|
* @param evt Event
|
||||||
*/
|
*/
|
||||||
private void stereoSolveActionPerformed(ActionEvent evt) {
|
private void stereoSolveActionPerformed(ActionEvent evt) {
|
||||||
@@ -337,6 +349,7 @@ public class StegSolve extends JFrame
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Open the frame browser
|
* Open the frame browser
|
||||||
|
*
|
||||||
* @param evt Event
|
* @param evt Event
|
||||||
*/
|
*/
|
||||||
private void frameBrowseActionPerformed(ActionEvent evt) {
|
private void frameBrowseActionPerformed(ActionEvent evt) {
|
||||||
@@ -345,33 +358,31 @@ public class StegSolve extends JFrame
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Open the image combiner
|
* Open the image combiner
|
||||||
|
*
|
||||||
* @param evt Event
|
* @param evt Event
|
||||||
*/
|
*/
|
||||||
private void imageCombineActionPerformed(ActionEvent evt) {
|
private void imageCombineActionPerformed(ActionEvent evt) {
|
||||||
JFileChooser fileChooser = new JFileChooser(System.getProperty("user.dir"));
|
JFileChooser fileChooser = new JFileChooser(System.getProperty("user.dir"));
|
||||||
FileNameExtensionFilter filter = new FileNameExtensionFilter("Images", "jpg", "jpeg", "gif", "bmp", "png");
|
FileNameExtensionFilter filter = new FileNameExtensionFilter("Images", "jpg", "jpeg", "gif", "bmp", "png");
|
||||||
fileChooser.setFileFilter(filter);
|
fileChooser.setFileFilter(filter);
|
||||||
fileChooser.setDialogTitle("Select image to combine with");
|
fileChooser.setDialogTitle("选择要合并的图像");
|
||||||
int rVal = fileChooser.showOpenDialog(this);
|
int rVal = fileChooser.showOpenDialog(this);
|
||||||
System.setProperty("user.dir", fileChooser.getCurrentDirectory().getAbsolutePath());
|
System.setProperty("user.dir", fileChooser.getCurrentDirectory().getAbsolutePath());
|
||||||
if(rVal == JFileChooser.APPROVE_OPTION)
|
if (rVal == JFileChooser.APPROVE_OPTION) {
|
||||||
{
|
|
||||||
sfile = fileChooser.getSelectedFile();
|
sfile = fileChooser.getSelectedFile();
|
||||||
try
|
try {
|
||||||
{
|
|
||||||
BufferedImage bi2 = null;
|
BufferedImage bi2 = null;
|
||||||
bi2 = ImageIO.read(sfile);
|
bi2 = ImageIO.read(sfile);
|
||||||
new Combiner(bi, bi2).setVisible(true);
|
new Combiner(bi, bi2).setVisible(true);
|
||||||
}
|
} catch (Exception e) {
|
||||||
catch (Exception e)
|
JOptionPane.showMessageDialog(this, "加载文件失败: " + e.toString());
|
||||||
{
|
|
||||||
JOptionPane.showMessageDialog(this, "Failed to load file: " +e.toString());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Open the data extractor
|
* Open the data extractor
|
||||||
|
*
|
||||||
* @param evt Event
|
* @param evt Event
|
||||||
*/
|
*/
|
||||||
private void analyseExtractActionPerformed(ActionEvent evt) {
|
private void analyseExtractActionPerformed(ActionEvent evt) {
|
||||||
@@ -380,35 +391,32 @@ public class StegSolve extends JFrame
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Save the current transformed image
|
* Save the current transformed image
|
||||||
|
*
|
||||||
* @param evt Event
|
* @param evt Event
|
||||||
*/
|
*/
|
||||||
private void fileSaveActionPerformed(ActionEvent evt)
|
private void fileSaveActionPerformed(ActionEvent evt) {
|
||||||
{
|
|
||||||
JFileChooser fileChooser = new JFileChooser(System.getProperty("user.dir"));
|
JFileChooser fileChooser = new JFileChooser(System.getProperty("user.dir"));
|
||||||
fileChooser.setSelectedFile(new File("solved.bmp"));
|
fileChooser.setSelectedFile(new File("solved.bmp"));
|
||||||
int rVal = fileChooser.showSaveDialog(this);
|
int rVal = fileChooser.showSaveDialog(this);
|
||||||
System.setProperty("user.dir", fileChooser.getCurrentDirectory().getAbsolutePath());
|
System.setProperty("user.dir", fileChooser.getCurrentDirectory().getAbsolutePath());
|
||||||
if(rVal == JFileChooser.APPROVE_OPTION)
|
if (rVal == JFileChooser.APPROVE_OPTION) {
|
||||||
{
|
|
||||||
sfile = fileChooser.getSelectedFile();
|
sfile = fileChooser.getSelectedFile();
|
||||||
try
|
try {
|
||||||
{
|
|
||||||
bi = transform.getImage();
|
bi = transform.getImage();
|
||||||
int rns = sfile.getName().lastIndexOf(".")+1;
|
int rns = sfile.getName().lastIndexOf(".") + 1;
|
||||||
if(rns==0)
|
if (rns == 0)
|
||||||
ImageIO.write(bi, "bmp", sfile);
|
ImageIO.write(bi, "bmp", sfile);
|
||||||
else
|
else
|
||||||
ImageIO.write(bi, sfile.getName().substring(rns), sfile);
|
ImageIO.write(bi, sfile.getName().substring(rns), sfile);
|
||||||
}
|
} catch (Exception e) {
|
||||||
catch (Exception e)
|
JOptionPane.showMessageDialog(this, "写入文件失败: " + e.toString());
|
||||||
{
|
|
||||||
JOptionPane.showMessageDialog(this, "Failed to write file: "+e.toString());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Open a file
|
* Open a file
|
||||||
|
*
|
||||||
* @param evt Event
|
* @param evt Event
|
||||||
*/
|
*/
|
||||||
private void fileOpenActionPerformed(ActionEvent evt) {
|
private void fileOpenActionPerformed(ActionEvent evt) {
|
||||||
@@ -417,33 +425,40 @@ public class StegSolve extends JFrame
|
|||||||
fileChooser.setFileFilter(filter);
|
fileChooser.setFileFilter(filter);
|
||||||
int rVal = fileChooser.showOpenDialog(this);
|
int rVal = fileChooser.showOpenDialog(this);
|
||||||
System.setProperty("user.dir", fileChooser.getCurrentDirectory().getAbsolutePath());
|
System.setProperty("user.dir", fileChooser.getCurrentDirectory().getAbsolutePath());
|
||||||
if(rVal == JFileChooser.APPROVE_OPTION)
|
if (rVal == JFileChooser.APPROVE_OPTION) {
|
||||||
{
|
|
||||||
sfile = fileChooser.getSelectedFile();
|
sfile = fileChooser.getSelectedFile();
|
||||||
try
|
loadImage(sfile);
|
||||||
{
|
}
|
||||||
bi = ImageIO.read(sfile);
|
}
|
||||||
transform = new Transform(bi);
|
|
||||||
newImage();
|
public void loadImage(String path) {
|
||||||
}
|
File sfile = new File(path);
|
||||||
catch (Exception e)
|
loadImage(sfile);
|
||||||
{
|
}
|
||||||
JOptionPane.showMessageDialog(this, "Failed to load file: " +e.toString());
|
|
||||||
}
|
void loadImage(File sfile) {
|
||||||
|
this.sfile = sfile;
|
||||||
|
try {
|
||||||
|
bi = ImageIO.read(sfile);
|
||||||
|
transform = new Transform(bi);
|
||||||
|
newImage();
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
JOptionPane.showMessageDialog(this, "加载文件失败: " + e.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reset settings for a new image
|
* Reset settings for a new image
|
||||||
*/
|
*/
|
||||||
private void newImage()
|
private void newImage() {
|
||||||
{
|
|
||||||
nowShowing.setText(transform.getText());
|
nowShowing.setText(transform.getText());
|
||||||
dp.setImage(transform.getImage());
|
dp.setImage(transform.getImage());
|
||||||
dp.setSize(transform.getImage().getWidth(),transform.getImage().getHeight());
|
dp.setSize(transform.getImage().getWidth(), transform.getImage().getHeight());
|
||||||
dp.setPreferredSize(new Dimension(transform.getImage().getWidth(),transform.getImage().getHeight()));
|
dp.setPreferredSize(new Dimension(transform.getImage().getWidth(), transform.getImage().getHeight()));
|
||||||
this.setMaximumSize(getToolkit().getScreenSize());
|
this.setMaximumSize(getToolkit().getScreenSize());
|
||||||
pack();
|
zoomSlider.setValue(100);
|
||||||
|
dp.apply(100);
|
||||||
scrollPane.revalidate();
|
scrollPane.revalidate();
|
||||||
repaint();
|
repaint();
|
||||||
}
|
}
|
||||||
@@ -451,22 +466,16 @@ public class StegSolve extends JFrame
|
|||||||
/**
|
/**
|
||||||
* Update the image being shown for new transform
|
* Update the image being shown for new transform
|
||||||
*/
|
*/
|
||||||
private void updateImage()
|
private void updateImage() {
|
||||||
{
|
|
||||||
nowShowing.setText(transform.getText());
|
nowShowing.setText(transform.getText());
|
||||||
dp.setImage(transform.getImage());
|
dp.setImage(transform.getImage());
|
||||||
repaint();
|
repaint();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param args the command line arguments
|
* @param args the command line arguments
|
||||||
*/
|
*/
|
||||||
public static void main(String args[]) {
|
public static void main(String args[]) {
|
||||||
EventQueue.invokeLater(new Runnable() {
|
EventQueue.invokeLater(() -> new StegSolve().setVisible(true));
|
||||||
public void run() {
|
|
||||||
new StegSolve().setVisible(true);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -214,7 +214,9 @@ public class Stereo extends JFrame
|
|||||||
this.setMaximumSize(getToolkit().getScreenSize());
|
this.setMaximumSize(getToolkit().getScreenSize());
|
||||||
pack();
|
pack();
|
||||||
scrollPane.revalidate();
|
scrollPane.revalidate();
|
||||||
|
dp.apply(100);
|
||||||
repaint();
|
repaint();
|
||||||
|
this.setSize(500, 600);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -78,7 +78,7 @@ public class StereoTransform {
|
|||||||
*/
|
*/
|
||||||
public String getText()
|
public String getText()
|
||||||
{
|
{
|
||||||
return "Offset: "+transNum;
|
return "偏移量: "+transNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -375,9 +375,9 @@ public class Transform {
|
|||||||
switch(transNum)
|
switch(transNum)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
return "Normal Image";
|
return "正常图像";
|
||||||
case 1:
|
case 1:
|
||||||
return "Colour Inversion (Xor)";
|
return "颜色反转 (Xor)";
|
||||||
case 2:
|
case 2:
|
||||||
case 3:
|
case 3:
|
||||||
case 4:
|
case 4:
|
||||||
@@ -429,7 +429,7 @@ public class Transform {
|
|||||||
case 40:
|
case 40:
|
||||||
return "Random colour map 3";
|
return "Random colour map 3";
|
||||||
case 41:
|
case 41:
|
||||||
return "Gray bits";
|
return "灰度";
|
||||||
default:
|
default:
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
66
stegsolve/ZoomSlider.java
Normal file
66
stegsolve/ZoomSlider.java
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
package stegsolve;
|
||||||
|
|
||||||
|
import javax.swing.*;
|
||||||
|
import java.awt.*;
|
||||||
|
import java.awt.event.KeyAdapter;
|
||||||
|
import java.awt.event.KeyEvent;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class ZoomSlider extends JPanel {
|
||||||
|
|
||||||
|
private JSlider slider;
|
||||||
|
private JTextField textBox;
|
||||||
|
private int value;
|
||||||
|
|
||||||
|
public int getValue () { return value; }
|
||||||
|
|
||||||
|
void setValue(int value) {
|
||||||
|
slider.setValue(value);
|
||||||
|
textBox.setText(String.valueOf(value));
|
||||||
|
this.value = value;
|
||||||
|
for (SliderChangeListener scl : changeListeners)
|
||||||
|
scl.change(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<SliderChangeListener> changeListeners = new ArrayList<>();
|
||||||
|
|
||||||
|
ZoomSlider(int min, int max, int defaultValue) {
|
||||||
|
JLabel tip = new JLabel("缩放:");
|
||||||
|
|
||||||
|
add(tip);
|
||||||
|
|
||||||
|
slider = new JSlider(min, max, defaultValue);
|
||||||
|
|
||||||
|
slider.addChangeListener(e -> {
|
||||||
|
setValue(slider.getValue());
|
||||||
|
});
|
||||||
|
|
||||||
|
add(slider);
|
||||||
|
|
||||||
|
textBox = new JTextField(String.valueOf(defaultValue), 5);
|
||||||
|
|
||||||
|
textBox.addKeyListener(new KeyAdapter() {
|
||||||
|
@Override
|
||||||
|
public void keyPressed(KeyEvent e) {
|
||||||
|
if(e.getKeyCode() == KeyEvent.VK_ENTER){
|
||||||
|
setValue(Integer.parseInt(textBox.getText()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
slider.setMaximumSize(new Dimension(500, 25));
|
||||||
|
|
||||||
|
add(textBox);
|
||||||
|
|
||||||
|
value = defaultValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
void addChangeListener(SliderChangeListener listener) {
|
||||||
|
changeListeners.add(listener);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
interface SliderChangeListener {
|
||||||
|
void change(int v);
|
||||||
|
}
|
Reference in New Issue
Block a user