Archives from S:\ Drive

Good to keep around methinks
This commit is contained in:
Amrit Panesar committed 2015-04-01 21:23:15 -07:00
1 parent eadaf70b9e
commit 6dd63cc439
606 files changed
+50212

No files matched your search

+74
View File
@@ -0,0 +1,74 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See commented blocks below for -->
<!-- some examples of how to customize the build. -->
<!-- (If you delete it and reopen the project it will be recreated.) -->
<!-- By default, only the Clean and Build commands use this build script. -->
<!-- Commands such as Run, Debug, and Test only use this build script if -->
<!-- the Compile on Save feature is turned off for the project. -->
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
<!-- in the project's Project Properties dialog box.-->
<project name="Project4" default="default" basedir=".">
<description>Builds, tests, and runs the project Project4.</description>
<import file="nbproject/build-impl.xml"/>
<!--
There exist several targets which are by default empty and which can be
used for execution of your tasks. These targets are usually executed
before and after some main targets. They are:
-pre-init: called before initialization of project properties
-post-init: called after initialization of project properties
-pre-compile: called before javac compilation
-post-compile: called after javac compilation
-pre-compile-single: called before javac compilation of single file
-post-compile-single: called after javac compilation of single file
-pre-compile-test: called before javac compilation of JUnit tests
-post-compile-test: called after javac compilation of JUnit tests
-pre-compile-test-single: called before javac compilation of single JUnit test
-post-compile-test-single: called after javac compilation of single JUunit test
-pre-jar: called before JAR building
-post-jar: called after JAR building
-post-clean: called after cleaning build products
(Targets beginning with '-' are not intended to be called on their own.)
Example of inserting an obfuscator after compilation could look like this:
<target name="-post-compile">
<obfuscate>
<fileset dir="${build.classes.dir}"/>
</obfuscate>
</target>
For list of available properties check the imported
nbproject/build-impl.xml file.
Another way to customize the build is by overriding existing main targets.
The targets of interest are:
-init-macrodef-javac: defines macro for javac compilation
-init-macrodef-junit: defines macro for junit execution
-init-macrodef-debug: defines macro for class debugging
-init-macrodef-java: defines macro for class execution
-do-jar-with-manifest: JAR building (if you are using a manifest)
-do-jar-without-manifest: JAR building (if you are not using a manifest)
run: execution of project
-javadoc-build: Javadoc generation
test-report: JUnit report generation
An example of overriding the target for project execution could look like this:
<target name="run" depends="Project4-impl.jar">
<exec dir="bin" executable="launcher.exe">
<arg file="${dist.jar}"/>
</exec>
</target>
Notice that the overridden target depends on the jar target and not only on
the compile target as the regular run target does. Again, for a list of available
properties which you can use, check the target you are overriding in the
nbproject/build-impl.xml file.
-->
</project>
@@ -0,0 +1,3 @@
Manifest-Version: 1.0
X-COMMENT: Main-Class will be added automatically by build
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,8 @@
build.xml.data.CRC32=00cce126
build.xml.script.CRC32=ccadb02c
build.xml.stylesheet.CRC32=28e38971@1.53.1.46
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=00cce126
nbproject/build-impl.xml.script.CRC32=43cc4ad2
nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.53.1.46
@@ -0,0 +1,2 @@
compile.on.save=true
user.properties.file=C:\\Documents and Settings\\77260\\Application Data\\NetBeans\\7.2\\build.properties
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
</project-private>
@@ -0,0 +1,72 @@
annotation.processing.enabled=true
annotation.processing.enabled.in.editor=false
annotation.processing.processor.options=
annotation.processing.processors.list=
annotation.processing.run.all.processors=true
annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
build.classes.dir=${build.dir}/classes
build.classes.excludes=**/*.java,**/*.form
# This directory is removed when the project is cleaned:
build.dir=build
build.generated.dir=${build.dir}/generated
build.generated.sources.dir=${build.dir}/generated-sources
# Only compile against the classpath explicitly listed here:
build.sysclasspath=ignore
build.test.classes.dir=${build.dir}/test/classes
build.test.results.dir=${build.dir}/test/results
# Uncomment to specify the preferred debugger connection transport:
#debug.transport=dt_socket
debug.classpath=\
${run.classpath}
debug.test.classpath=\
${run.test.classpath}
# This directory is removed when the project is cleaned:
dist.dir=dist
dist.jar=${dist.dir}/Project4.jar
dist.javadoc.dir=${dist.dir}/javadoc
excludes=
includes=**
jar.compress=false
javac.classpath=\
${libs.beans-binding.classpath}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
javac.processorpath=\
${javac.classpath}
javac.source=1.6
javac.target=1.6
javac.test.classpath=\
${javac.classpath}:\
${build.classes.dir}
javac.test.processorpath=\
${javac.test.classpath}
javadoc.additionalparam=
javadoc.author=false
javadoc.encoding=${source.encoding}
javadoc.noindex=false
javadoc.nonavbar=false
javadoc.notree=false
javadoc.private=false
javadoc.splitindex=true
javadoc.use=true
javadoc.version=false
javadoc.windowtitle=
main.class=project4.Project4
manifest.file=manifest.mf
meta.inf.dir=${src.dir}/META-INF
mkdist.disabled=false
platform.active=default_platform
run.classpath=\
${javac.classpath}:\
${build.classes.dir}
# Space-separated list of JVM arguments used when running the project.
# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value.
# To set system properties for unit tests define test-sys-prop.name=value:
run.jvmargs=
run.test.classpath=\
${javac.test.classpath}:\
${build.test.classes.dir}
source.encoding=UTF-8
src.dir=src
test.src.dir=test
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.java.j2seproject</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/j2se-project/3">
<name>Project4</name>
<source-roots>
<root id="src.dir"/>
</source-roots>
<test-roots>
<root id="test.src.dir"/>
</test-roots>
</data>
</configuration>
</project>
@@ -0,0 +1,36 @@
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package project4;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import javax.swing.JFrame;
/**
*
* @author 77260
*/
public class Project4 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
SwingSuspendResume vsr = new SwingSuspendResume();
Thread t = new Thread(vsr);
t.start();
JFrame f = new JFrame();
f.setContentPane(vsr);
f.setSize(320, 200);
f.setVisible(true);
f.addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent e) {
System.exit(0);
}
});
}
}
@@ -0,0 +1,162 @@
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package project4;
import java.awt.FlowLayout;
import java.awt.Font;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JSlider;
import javax.swing.JTextField;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
/**
*
* @author 77260
*/
public class SwingSuspendResume extends JPanel implements Runnable {
private static final String[] symbolList = { "|", "/", "-", "\\", "|", "/",
"-", "\\" };
private Thread runThread;
private JTextField symbolTF;
public SwingSuspendResume() {
symbolTF = new JTextField();
symbolTF.setEditable(false);
symbolTF.setFont(new Font("Monospaced", Font.BOLD, 26));
symbolTF.setHorizontalAlignment(JTextField.CENTER);
final JButton suspendB = new JButton("Suspend");
final JButton resumeB = new JButton("Resume");
final JSlider jSlider1 = new javax.swing.JSlider();
final JButton jButton1 = new JButton("Reverse");
suspendB.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
suspendNow();
}
});
resumeB.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
resumeNow();
}
});
jSlider1.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent ce)
{
changeval(jSlider1.getValue());
}
});
jButton1.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
toggle();
}
});
JPanel innerStackP = new JPanel();
innerStackP.setLayout(new GridLayout(0, 1, 4, 4));
innerStackP.add(symbolTF);
innerStackP.add(suspendB);
innerStackP.add(resumeB);
innerStackP.add(jSlider1);
innerStackP.add(jButton1);
this.setLayout(new FlowLayout(FlowLayout.CENTER));
this.add(innerStackP);
}
private void changeval(int value) {
sleepcount = (value *2);
//System.out.println(value);
}
private void toggle() {
if (toggle)
{
toggle = false;
} else {
toggle = true;
}
}
private void suspendNow() {
if (runThread != null) { // avoid NullPointerException
runThread.suspend();
}
}
private void resumeNow() {
if (runThread != null) { // avoid NullPointerException
runThread.resume();
}
}
public int sleepcount = 200;
public boolean toggle = false;
@Override
public void run() {
try {
// Store this for the suspendNow() and
// resumeNow() methods to use.
runThread = Thread.currentThread();
int count = 0;
while (true) {
// each time through, show the next symbol
symbolTF.setText(symbolList[count % symbolList.length]);
Thread.sleep(sleepcount);
if (toggle)
{
if (count == 0)
{ count = 2147483647; }
count--;
} else {
if (count == 2147483647)
{ count = 0; }
count++;
}
}
} catch (InterruptedException x) {
// ignore
} finally {
// make sure that the reference to it is also lost.
runThread = null;
}
}
public static void main(String[] args) {
SwingSuspendResume vsr = new SwingSuspendResume();
Thread t = new Thread(vsr);
t.start();
JFrame f = new JFrame();
f.setContentPane(vsr);
f.setSize(320, 200);
f.setVisible(true);
f.addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent e) {
System.exit(0);
}
});
}
}
@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8" ?>
<Form version="1.5" maxVersion="1.8" type="org.netbeans.modules.form.forminfo.JFrameFormInfo">
<Properties>
<Property name="defaultCloseOperation" type="int" value="3"/>
</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="54" max="-2" attributes="0"/>
<Component id="jSlider1" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="146" 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 min="-2" pref="63" max="-2" attributes="0"/>
<Component id="jSlider1" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="212" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="javax.swing.JSlider" name="jSlider1">
<BindingProperties>
<BindingProperty name="value" source="jSlider1" sourcePath="${value}" target="jSlider1" targetPath="value" updateStrategy="0" immediately="false">
<BindingParameter name="IGNORE_ADJUSTING" value="N"/>
</BindingProperty>
</BindingProperties>
</Component>
</SubComponents>
</Form>
@@ -0,0 +1,97 @@
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package project4;
/**
*
* @author 77260
*/
public class test extends javax.swing.JFrame {
/**
* Creates new form test
*/
public test() {
initComponents();
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
bindingGroup = new org.jdesktop.beansbinding.BindingGroup();
jSlider1 = new javax.swing.JSlider();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
org.jdesktop.beansbinding.Binding binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jSlider1, org.jdesktop.beansbinding.ELProperty.create("${value}"), jSlider1, org.jdesktop.beansbinding.BeanProperty.create("value"));
bindingGroup.addBinding(binding);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(54, 54, 54)
.addComponent(jSlider1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(146, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(63, 63, 63)
.addComponent(jSlider1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(212, Short.MAX_VALUE))
);
bindingGroup.bind();
pack();
}// </editor-fold>//GEN-END:initComponents
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(test.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(test.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(test.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(test.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
//</editor-fold>
/* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new test().setVisible(true);
}
});
}
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JSlider jSlider1;
private org.jdesktop.beansbinding.BindingGroup bindingGroup;
// End of variables declaration//GEN-END:variables
}