Skip to content

Commit 5c6e930

Browse files
committed
Updated to use cst-bindings 1.0.4 and cst 1.2.0
1 parent 02e8a93 commit 5c6e930

File tree

11 files changed

+57
-13
lines changed

11 files changed

+57
-13
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Note: This library is still under development, and some concepts or features mig
3232
```
3333
dependencies {
3434
...
35-
implementation 'com.github.CST-Group:cst-desktop:1.0.2'
35+
implementation 'com.github.CST-Group:cst-desktop:1.0.3'
3636
}
3737
```
3838

@@ -57,7 +57,7 @@ Sometimes, the version number (tag) in this README gets out of date, as maintain
5757
<dependency>
5858
<groupId>com.github.CST-Group</groupId>
5959
<artifactId>cst-desktop</artifactId>
60-
<version>1.0.2</version>
60+
<version>1.0.3</version>
6161
</dependency>
6262
```
6363

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description = "CST-Desktop"
1010

1111
sourceCompatibility = 1.8
1212
targetCompatibility = 1.8
13-
version = '1.0.2'
13+
version = '1.0.3'
1414

1515
repositories {
1616
flatDir {
@@ -35,7 +35,7 @@ configurations {
3535

3636
dependencies {
3737
//api('com.github.CST-Group:cst:30fe97d')
38-
api('com.github.CST-Group:cst-bindings:1.0.3')
38+
api('com.github.CST-Group:cst-bindings:1.0.4')
3939

4040
api group: 'org.jfree', name: 'jfreechart', version: '1.0.19'
4141
api 'com.soartech:jsoar-core:4.1.0'

src/main/java/br/unicamp/cst/util/viewer/MindRenderer.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,19 @@ public Component getTreeCellRendererComponent(JTree tree, Object value, boolean
121121
break;
122122
case TreeElement.ICON_EPISODECATEGORY:
123123
img = new ImageIcon(this.getClass().getClassLoader().getResource("episodeCategory.png"));
124+
break;
125+
case TreeElement.ICON_PROPERTYPOSSIBILITY:
126+
img = new ImageIcon(this.getClass().getClassLoader().getResource("property-p.png"));
127+
break;
128+
case TreeElement.ICON_OBJECTPOSSIBILITY:
129+
img = new ImageIcon(this.getClass().getClassLoader().getResource("object-p.png"));
130+
break;
131+
case TreeElement.ICON_EPISODEPOSSIBILITY:
132+
img = new ImageIcon(this.getClass().getClassLoader().getResource("episode-p.png"));
124133
break;
134+
case TreeElement.ICON_OBJECTEXISTENCE:
135+
img = new ImageIcon(this.getClass().getClassLoader().getResource("object-e.png"));
136+
break;
125137
}
126138
setOpenIcon(img);
127139
setClosedIcon(img);

src/main/java/br/unicamp/cst/util/viewer/TreeElement.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@ public class TreeElement {
5555
public static final int ICON_PROPERTYCATEGORY = 21;
5656
public static final int ICON_OBJECTCATEGORY = 22;
5757
public static final int ICON_EPISODECATEGORY = 23;
58+
public static final int ICON_PROPERTYPOSSIBILITY = 24;
59+
public static final int ICON_OBJECTPOSSIBILITY = 25;
60+
public static final int ICON_EPISODEPOSSIBILITY = 26;
61+
public static final int ICON_OBJECTEXISTENCE = 27;
62+
5863

5964

6065
public TreeElement(String name, int node_type, Object element, int typeIcon) {

src/main/java/br/unicamp/cst/util/viewer/representation/idea/IdeaEditor.form

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@
4343
</SubComponents>
4444
</Menu>
4545
</NonVisualComponents>
46-
<Properties>
47-
<Property name="defaultCloseOperation" type="int" value="3"/>
48-
</Properties>
4946
<SyntheticProperties>
5047
<SyntheticProperty name="menuBar" type="java.lang.String" value="jMenuBar1"/>
5148
<SyntheticProperty name="formSizePolicy" type="int" value="1"/>
@@ -83,7 +80,6 @@
8380
<SubComponents>
8481
<Container class="javax.swing.JToolBar" name="jToolBar1">
8582
<Properties>
86-
<Property name="floatable" type="boolean" value="false"/>
8783
<Property name="rollover" type="boolean" value="true"/>
8884
</Properties>
8985

src/main/java/br/unicamp/cst/util/viewer/representation/idea/IdeaEditor.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public class IdeaEditor extends javax.swing.JFrame {
2525
IdeaPanel wmp;
2626
Idea root;
2727
List<IdeaEditorListener> listeners;
28+
public boolean finished = false;
2829

2930
/**
3031
* Creates new form IdeaEditor
@@ -81,9 +82,6 @@ private void initComponents() {
8182
mClose = new javax.swing.JMenuItem();
8283
jMenu2 = new javax.swing.JMenu();
8384

84-
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
85-
86-
jToolBar1.setFloatable(false);
8785
jToolBar1.setRollover(true);
8886

8987
zoom_in.setIcon(new javax.swing.ImageIcon(getClass().getResource("/zoom-in-icon.png"))); // NOI18N
@@ -200,7 +198,10 @@ private void mSaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:e
200198

201199
private void mCloseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mCloseActionPerformed
202200
// TODO add your handling code here:
203-
this.dispose();
201+
finished = true;
202+
System.out.println("Setting finished to "+finished);
203+
//this.dispose();
204+
//this.setVisible(false);
204205
}//GEN-LAST:event_mCloseActionPerformed
205206

206207
private void mLoadActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mLoadActionPerformed

src/main/java/br/unicamp/cst/util/viewer/representation/idea/IdeaTreeNode.java

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,15 @@ else if (category_type.equalsIgnoreCase("ObjectCategory")) {
116116
else if (category_type.equalsIgnoreCase("EpisodeCategory")) {
117117
node.setType(11);
118118
}
119+
else if (category_type.equalsIgnoreCase("PropertyPossibility")) {
120+
node.setType(12);
121+
}
122+
else if (category_type.equalsIgnoreCase("ObjectPossibility")) {
123+
node.setType(13);
124+
}
125+
else if (category_type.equalsIgnoreCase("EpisodePossibility")) {
126+
node.setType(14);
127+
}
119128
}
120129
}
121130

@@ -127,7 +136,7 @@ public void representIdea(Idea node) {
127136
switch(node.getType()) {
128137
case 0: // This type is for Idea objects
129138
if (te.getIcon() != TreeElement.ICON_MIND)
130-
te.setIcon(TreeElement.ICON_OBJECT3);
139+
te.setIcon(TreeElement.ICON_OBJECTEXISTENCE);
131140
if (value.equalsIgnoreCase(""))
132141
te.setName(node.getName());
133142
else te.setName(node.getName()+" ["+value+"]");
@@ -208,7 +217,28 @@ public void representIdea(Idea node) {
208217
if (value.equalsIgnoreCase(""))
209218
te.setName(node.getName());
210219
else te.setName(node.getName()+" ["+value+"]");
220+
break;
221+
case 12: // This type is for a PropertyCategory
222+
if (te.getIcon() != TreeElement.ICON_MIND)
223+
te.setIcon(TreeElement.ICON_PROPERTYPOSSIBILITY);
224+
if (value.equalsIgnoreCase(""))
225+
te.setName(node.getName());
226+
else te.setName(node.getName()+": "+value);
211227
break;
228+
case 13: // This type is for a ObjectCategory
229+
if (te.getIcon() != TreeElement.ICON_MIND)
230+
te.setIcon(TreeElement.ICON_OBJECTPOSSIBILITY);
231+
if (value.equalsIgnoreCase(""))
232+
te.setName(node.getName());
233+
else te.setName(node.getName()+" ["+value+"]");
234+
break;
235+
case 14: // This type is for a EpisodeCategory
236+
if (te.getIcon() != TreeElement.ICON_MIND)
237+
te.setIcon(TreeElement.ICON_EPISODEPOSSIBILITY);
238+
if (value.equalsIgnoreCase(""))
239+
te.setName(node.getName());
240+
else te.setName(node.getName()+" ["+value+"]");
241+
break;
212242
default: if (te.getIcon() != TreeElement.ICON_MIND)
213243
te.setIcon(TreeElement.ICON_OBJECT3);
214244
if (value.equalsIgnoreCase(""))

src/main/resources/episode-p.png

5.77 KB
Loading

src/main/resources/object-e.png

5.58 KB
Loading

src/main/resources/object-p.png

5.62 KB
Loading

src/main/resources/property-p.png

5.59 KB
Loading

0 commit comments

Comments
 (0)