Skip to content

Commit ec08c67

Browse files
committed
Merge pull request #32 from maartentbm/mavenExecutable
Maven executable
2 parents 32728b1 + 9b184a4 commit ec08c67

5 files changed

Lines changed: 86 additions & 28 deletions

File tree

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
*.nwk
1111
*.graph
1212
*.classpath
13-
*.project
1413

1514
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
1615
hs_err_pid*

.project

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>ContextPL1</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
<buildCommand>
14+
<name>edu.umd.cs.findbugs.plugin.eclipse.findbugsBuilder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
18+
<buildCommand>
19+
<name>net.sf.eclipsecs.core.CheckstyleBuilder</name>
20+
<arguments>
21+
</arguments>
22+
</buildCommand>
23+
<buildCommand>
24+
<name>org.eclipse.m2e.core.maven2Builder</name>
25+
<arguments>
26+
</arguments>
27+
</buildCommand>
28+
</buildSpec>
29+
<natures>
30+
<nature>org.eclipse.m2e.core.maven2Nature</nature>
31+
<nature>org.eclipse.jdt.core.javanature</nature>
32+
<nature>edu.umd.cs.findbugs.plugin.eclipse.findbugsNature</nature>
33+
<nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
34+
</natures>
35+
</projectDescription>

.settings/org.eclipse.core.resources.prefs

Lines changed: 0 additions & 6 deletions
This file was deleted.

pom.xml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,27 @@
3535
<plugin>
3636
<artifactId>maven-compiler-plugin</artifactId>
3737
<version>3.1</version>
38+
</plugin>
39+
<plugin>
40+
<artifactId>maven-assembly-plugin</artifactId>
41+
<executions>
42+
<execution>
43+
<phase>package</phase>
44+
<goals>
45+
<goal>single</goal>
46+
</goals>
47+
</execution>
48+
</executions>
3849
<configuration>
39-
<source/>
40-
<target/>
50+
<descriptorRefs>
51+
<descriptorRef>jar-with-dependencies</descriptorRef>
52+
</descriptorRefs>
53+
<archive>
54+
<manifest>
55+
<addClasspath>true</addClasspath>
56+
<mainClass>Start</mainClass>
57+
</manifest>
58+
</archive>
4159
</configuration>
4260
</plugin>
4361
</plugins>

src/main/java/nl/tudelft/ti2806/pl1/gui/contentpane/GraphPanel.java

Lines changed: 31 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,7 @@ public final boolean loadGraph(final File nodes, final File edges)
179179
} catch (UnsupportedEncodingException e) {
180180
e.printStackTrace();
181181
}
182-
graph.addAttribute("ui.stylesheet",
183-
"url('src/main/resources/stylesheet.css')");
182+
graph.addAttribute("ui.stylesheet", "url('stylesheet.css')");
184183
// System.setProperty("org.graphstream.ui.renderer",
185184
// "org.graphstream.ui.j2dviewer.J2DGraphRenderer");
186185
Viewer viewer = new Viewer(graph,
@@ -269,6 +268,7 @@ private void notifyObservers(final DNode selectedNodeIn) {
269268
/**
270269
* {@inheritDoc} Changes to the graph graphics based on the selected node.
271270
*/
271+
@Override
272272
public final void update(final DNode newSelectedNode) {
273273
text.setText(newSelectedNode.getContent());
274274
// TODO change strings to constants (still have to decide in which class
@@ -363,6 +363,7 @@ class Scrolling implements MouseWheelListener {
363363
* @param e
364364
* MouseWheelEvent for which is being handled.
365365
*/
366+
@Override
366367
public void mouseWheelMoved(final MouseWheelEvent e) {
367368
int rotation = -1 * e.getWheelRotation();
368369
if (count > NEWLEVEL) {
@@ -472,23 +473,25 @@ private ScrollListener(final JScrollBar scrollBar) {
472473
}
473474

474475
/** {@inheritDoc} */
476+
@Override
475477
public void adjustmentValueChanged(final AdjustmentEvent e) {
476-
int type = e.getAdjustmentType();
477-
if (type == AdjustmentEvent.BLOCK_DECREMENT) {
478-
System.out.println("Scroll block decr");
479-
} else if (type == AdjustmentEvent.BLOCK_INCREMENT) {
480-
System.out.println("Scroll block incr");
481-
} else if (type == AdjustmentEvent.UNIT_DECREMENT) {
482-
System.out.println("Scroll unit incr");
483-
} else if (type == AdjustmentEvent.UNIT_INCREMENT) {
484-
System.out.println("Scroll unit incr");
485-
} else if (type == AdjustmentEvent.TRACK) {
486-
System.out.println("Scroll track");
487-
System.out.println("e.getValue() == " + e.getValue());
488-
// TODO (use this for genome location plotting?)
489-
// seems to always have this adjustment event type :$
490-
// http://examples.javacodegeeks.com/desktop-java/awt/event/adjustmentlistener-example
491-
}
478+
// int type = e.getAdjustmentType();
479+
// if (type == AdjustmentEvent.BLOCK_DECREMENT) {
480+
// System.out.println("Scroll block decr");
481+
// } else if (type == AdjustmentEvent.BLOCK_INCREMENT) {
482+
// System.out.println("Scroll block incr");
483+
// } else if (type == AdjustmentEvent.UNIT_DECREMENT) {
484+
// System.out.println("Scroll unit incr");
485+
// } else if (type == AdjustmentEvent.UNIT_INCREMENT) {
486+
// System.out.println("Scroll unit incr");
487+
// } else if (type == AdjustmentEvent.TRACK) {
488+
// System.out.println("Scroll track");
489+
// System.out.println("e.getValue() == " + e.getValue());
490+
// // TODO (use this for genome location plotting?)
491+
// // seems to always have this adjustment event type :$
492+
// //
493+
// http://examples.javacodegeeks.com/desktop-java/awt/event/adjustmentlistener-example
494+
// }
492495
}
493496

494497
}
@@ -511,6 +514,7 @@ public GenomeHighlight() {
511514
}
512515

513516
/** {@inheritDoc} */
517+
@Override
514518
public void update(final GenomeRow genomeRow,
515519
final boolean genomeFilterChanged,
516520
final boolean genomeHighlightChanged) {
@@ -541,22 +545,25 @@ class NodeClickListener implements ViewerListener {
541545
/**
542546
* {@inheritDoc}
543547
*/
548+
@Override
544549
public void viewClosed(final String viewName) {
545550
}
546551

547552
/**
548553
* {@inheritDoc}
549554
*/
555+
@Override
550556
public void buttonReleased(final String id) {
551557
Event.statusBarMid("Selected node: " + id);
558+
selectNode(graph.getNode(id));
552559
notifyObservers(dgraph.getDNode(Integer.valueOf(id)));
553560
}
554561

555562
/**
556563
* {@inheritDoc}
557564
*/
565+
@Override
558566
public void buttonPushed(final String id) {
559-
selectNode(graph.getNode(id));
560567
}
561568
}
562569

@@ -575,24 +582,29 @@ public void buttonPushed(final String id) {
575582
class ViewMouseListener implements MouseListener {
576583

577584
/** {@inheritDoc} */
585+
@Override
578586
public void mouseReleased(final MouseEvent e) {
579587
vp.pump();
580588
}
581589

582590
/** {@inheritDoc} */
591+
@Override
583592
public void mousePressed(final MouseEvent e) {
584593
vp.pump();
585594
}
586595

587596
/** {@inheritDoc} */
597+
@Override
588598
public void mouseExited(final MouseEvent e) {
589599
}
590600

591601
/** {@inheritDoc} */
602+
@Override
592603
public void mouseEntered(final MouseEvent e) {
593604
}
594605

595606
/** {@inheritDoc} */
607+
@Override
596608
public void mouseClicked(final MouseEvent e) {
597609
}
598610

0 commit comments

Comments
 (0)