|
a/tool/src/GUI/StudioUI4.java |
|
b/tool/src/GUI/StudioUI4.java |
|
... |
|
... |
123 |
|
123 |
|
124 |
panelWest.setAutoscrolls(true);
|
124 |
panelWest.setAutoscrolls(true);
|
125 |
panelWest.setPreferredSize(new java.awt.Dimension(172, 362));
|
125 |
panelWest.setPreferredSize(new java.awt.Dimension(172, 362));
|
126 |
|
126 |
|
127 |
tree.setBorder(javax.swing.BorderFactory.createEmptyBorder(3, 2, 5, 5));
|
127 |
tree.setBorder(javax.swing.BorderFactory.createEmptyBorder(3, 2, 5, 5));
|
|
|
128 |
tree.setAutoscrolls(true);
|
128 |
tree.setLargeModel(true);
|
129 |
tree.setLargeModel(true);
|
129 |
tree.setRootVisible(false);
|
130 |
tree.setRootVisible(false);
|
130 |
tree.setRowHeight(18);
|
131 |
tree.setRowHeight(18);
|
131 |
tree.setToggleClickCount(1);
|
132 |
tree.setToggleClickCount(1);
|
132 |
tree.addMouseListener(new java.awt.event.MouseAdapter() {
|
133 |
tree.addMouseListener(new java.awt.event.MouseAdapter() {
|
|
... |
|
... |
224 |
panelEast.setLayout(panelEastLayout);
|
225 |
panelEast.setLayout(panelEastLayout);
|
225 |
panelEastLayout.setHorizontalGroup(
|
226 |
panelEastLayout.setHorizontalGroup(
|
226 |
panelEastLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
227 |
panelEastLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
227 |
.addComponent(jScrollPane2)
|
228 |
.addComponent(jScrollPane2)
|
228 |
.addGroup(panelEastLayout.createSequentialGroup()
|
229 |
.addGroup(panelEastLayout.createSequentialGroup()
|
229 |
.addComponent(button, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
|
230 |
.addComponent(button, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)
|
230 |
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
231 |
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
231 |
.addComponent(search)
|
232 |
.addComponent(search)
|
232 |
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
233 |
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
233 |
.addComponent(button1, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE))
|
234 |
.addComponent(button1, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
|
235 |
.addContainerGap())
|
234 |
);
|
236 |
);
|
235 |
panelEastLayout.setVerticalGroup(
|
237 |
panelEastLayout.setVerticalGroup(
|
236 |
panelEastLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
238 |
panelEastLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
237 |
.addGroup(panelEastLayout.createSequentialGroup()
|
239 |
.addGroup(panelEastLayout.createSequentialGroup()
|
|
|
240 |
.addGap(5, 5, 5)
|
238 |
.addGroup(panelEastLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
241 |
.addGroup(panelEastLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
239 |
.addComponent(button1, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
|
240 |
.addGroup(panelEastLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
242 |
.addGroup(panelEastLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
241 |
.addComponent(button, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
243 |
.addComponent(button, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
242 |
.addComponent(search, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 34, Short.MAX_VALUE)))
|
244 |
.addComponent(search, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 34, Short.MAX_VALUE))
|
|
|
245 |
.addComponent(button1, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE))
|
243 |
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
246 |
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
244 |
.addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 312, Short.MAX_VALUE))
|
247 |
.addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 440, Short.MAX_VALUE))
|
245 |
);
|
248 |
);
|
246 |
|
249 |
|
247 |
jSplitPane1.setRightComponent(panelEast);
|
250 |
jSplitPane1.setRightComponent(panelEast);
|
248 |
|
251 |
|
249 |
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
|
252 |
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
|
250 |
getContentPane().setLayout(layout);
|
253 |
getContentPane().setLayout(layout);
|
251 |
layout.setHorizontalGroup(
|
254 |
layout.setHorizontalGroup(
|
252 |
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
255 |
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
253 |
.addGroup(layout.createSequentialGroup()
|
|
|
254 |
.addContainerGap()
|
|
|
255 |
.addComponent(jSplitPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 608, Short.MAX_VALUE)
|
256 |
.addComponent(jSplitPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 714, Short.MAX_VALUE)
|
256 |
.addContainerGap())
|
|
|
257 |
);
|
257 |
);
|
258 |
layout.setVerticalGroup(
|
258 |
layout.setVerticalGroup(
|
259 |
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
259 |
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
260 |
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
|
|
261 |
.addContainerGap()
|
|
|
262 |
.addComponent(jSplitPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 357, Short.MAX_VALUE)
|
260 |
.addComponent(jSplitPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 490, Short.MAX_VALUE)
|
263 |
.addContainerGap())
|
|
|
264 |
);
|
261 |
);
|
265 |
|
262 |
|
266 |
pack();
|
263 |
pack();
|
267 |
}// </editor-fold>//GEN-END:initComponents
|
264 |
}// </editor-fold>//GEN-END:initComponents
|
268 |
|
265 |
|
|
... |
|
... |
345 |
swingUtils.nodeAddRoot(tree);
|
342 |
swingUtils.nodeAddRoot(tree);
|
346 |
|
343 |
|
347 |
// now add all products that we can find
|
344 |
// now add all products that we can find
|
348 |
actions.addTreeSPDX(tree);
|
345 |
actions.addTreeSPDX(tree);
|
349 |
|
346 |
|
350 |
|
|
|
351 |
// set our first product as the default thing when adding
|
|
|
352 |
// more components from the library
|
|
|
353 |
// if(core.products != null)
|
|
|
354 |
// if(core.products.isEmpty() == false){
|
|
|
355 |
// productSelected = core.products.get(0);
|
|
|
356 |
// System.out.println("KH09 - Selecting the first product as default");
|
|
|
357 |
// }
|
|
|
358 |
|
347 |
|
359 |
// get the list of RunPlugins going
|
348 |
// get the list of RunPlugins going
|
360 |
RunPlugins.listPlugins();
|
349 |
RunPlugins.listPlugins();
|
361 |
log.write(is.INFO, Messages.ReadyToUse);
|
350 |
log.write(is.INFO, Messages.ReadyToUse);
|
362 |
// log.write(is.INFO, Messages.ReadyToUse);
|
351 |
// log.write(is.INFO, Messages.ReadyToUse);
|
|
... |
|
... |
540 |
|
529 |
|
541 |
// set the new content, first the type and then the text
|
530 |
// set the new content, first the type and then the text
|
542 |
text.setContentType(contentType);
|
531 |
text.setContentType(contentType);
|
543 |
text.setText(content);
|
532 |
text.setText(content);
|
544 |
// disable this box if you don't need to see the output on a file
|
533 |
// disable this box if you don't need to see the output on a file
|
545 |
utils.files.SaveStringToFile(new File("output.html"), content);
|
534 |
//utils.files.SaveStringToFile(new File("output.html"), content);
|
546 |
|
535 |
|
547 |
// should the button enabled?
|
536 |
// should the button enabled?
|
548 |
button.setEnabled(true);
|
537 |
button.setEnabled(true);
|
549 |
|
538 |
|
550 |
// change the cursor position
|
539 |
// change the cursor position
|
|
... |
|
... |
885 |
// submit the request to be executed
|
874 |
// submit the request to be executed
|
886 |
controller.process(request);
|
875 |
controller.process(request);
|
887 |
}
|
876 |
}
|
888 |
|
877 |
|
889 |
|
878 |
|
890 |
|
|
|
891 |
// split each of the parameters into something we can process
|
|
|
892 |
// String[] params = data.split("&");
|
|
|
893 |
// System.err.println("SU02 - Processing FORM: " + data);
|
|
|
894 |
// String method = request.BaseFolder + ">>" + e.getURL().getPath() +">>" + e.getURL().getQuery();
|
|
|
895 |
// System.err.println(method);
|
|
|
896 |
// add method name
|
|
|
897 |
// // go through each parameter
|
|
|
898 |
// for (String param : params) {
|
|
|
899 |
// String[] pair = param.split("=");
|
|
|
900 |
// String value = "";
|
|
|
901 |
// String key = "";
|
|
|
902 |
// if (pair.length > 1) {
|
|
|
903 |
// try {
|
|
|
904 |
// key = java.net.URLDecoder.decode(pair[0], "UTF-8");
|
|
|
905 |
// value = java.net.URLDecoder.decode(pair[1], "UTF-8");
|
|
|
906 |
// //value = pair[1];
|
|
|
907 |
// } catch (UnsupportedEncodingException er) {
|
|
|
908 |
// log.write(is.ERROR,
|
|
|
909 |
// "Failed to read form: %1", data);
|
|
|
910 |
// return;
|
|
|
911 |
// }
|
|
|
912 |
// } else if (pair.length == 1) {
|
|
|
913 |
// try {
|
|
|
914 |
// key = java.net.URLDecoder.decode(pair[0], "UTF-8");
|
|
|
915 |
// //value = pair[1];
|
|
|
916 |
// } catch (UnsupportedEncodingException er) {
|
|
|
917 |
// log.write(is.ERROR,
|
|
|
918 |
// "Failed to read form: %1", data);
|
|
|
919 |
// return;
|
|
|
920 |
// }
|
|
|
921 |
// }
|
|
|
922 |
// // add this parameter on our list
|
|
|
923 |
// request.addParameter(key, value);
|
|
|
924 |
// }// for
|
|
|
925 |
// list all parameters that we have
|
|
|
926 |
// for(String[] parameter : request.parameters){
|
|
|
927 |
// System.err.println(parameter[0] +"->"+ parameter[1]);
|
|
|
928 |
// }
|
|
|
929 |
|
|
|
930 |
// /**
|
|
|
931 |
// * Add related news to the front screen
|
|
|
932 |
// */
|
|
|
933 |
// private void doFrontScreen() {
|
|
|
934 |
//
|
|
|
935 |
// String timeLine = www.twitter.getTimeLine("@triplechecked");
|
|
|
936 |
//
|
|
|
937 |
// // did we got anything from the web?
|
|
|
938 |
// if(timeLine == null){
|
|
|
939 |
// // nothing, just return without further action
|
|
|
940 |
// return;
|
|
|
941 |
// }
|
|
|
942 |
//
|
|
|
943 |
// String result = ""
|
|
|
944 |
// + html.div()
|
|
|
945 |
// + html.h2("Share your open source news "
|
|
|
946 |
// + "@" + html.link("triplechecked", "http://twitter.com/triplechecked")
|
|
|
947 |
// + "")
|
|
|
948 |
// + timeLine
|
|
|
949 |
// + html._div
|
|
|
950 |
// ;
|
|
|
951 |
// this.editorPane(is.contentHTML, false, 0, result);
|
|
|
952 |
// }
|
|
|
953 |
|
|
|
954 |
private void callFrontScreen() {
|
879 |
private void callFrontScreen() {
|
955 |
log.write(is.INFO, Messages.CallFrontScreen);
|
880 |
log.write(is.INFO, Messages.CallFrontScreen);
|
956 |
}
|
881 |
}
|
957 |
|
882 |
|
958 |
}
|
883 |
}
|