Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
TTool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mbe-tools
TTool
Commits
69238eea
Commit
69238eea
authored
10 years ago
by
Dominique Blouin
Browse files
Options
Downloads
Patches
Plain Diff
display SearchBox in center; eliminate the output to console when searching.
parent
f98553a9
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/myutil/GoogleSearch.java
+12
-10
12 additions, 10 deletions
src/myutil/GoogleSearch.java
src/ui/TDiagramMouseManager.java
+2
-1
2 additions, 1 deletion
src/ui/TDiagramMouseManager.java
src/ui/window/JDialogSearchBox.java
+5
-3
5 additions, 3 deletions
src/ui/window/JDialogSearchBox.java
with
19 additions
and
14 deletions
src/myutil/GoogleSearch.java
+
12
−
10
View file @
69238eea
package
myutil
;
import
java.io.IOException
;
import
java.io.UnsupportedEncodingException
;
import
java.net.URLDecoder
;
...
...
@@ -11,6 +12,7 @@ import org.jsoup.nodes.Element;
import
org.jsoup.select.Elements
;
import
org.jsoup.nodes.Document
;
import
myutil.TraceManager
;
public
class
GoogleSearch
{
...
...
@@ -69,9 +71,9 @@ public class GoogleSearch {
if
(
descelement
.
size
()!=
0
)
desc
=
descelement
.
first
().
text
();
System
.
out
.
println
(
"Title: --> "
+
title
);
System
.
out
.
println
(
"url: --> "
+
url
);
System
.
out
.
println
(
"Decription: --> "
+
desc
);
//TraceManager.addDev
("Title: --> "+title);
//TraceManager.addDev
("url: --> "+url);
//TraceManager.addDev
("Decription: --> "+desc);
gs
.
setTitle
(
title
);
gs
.
setUrl
(
url
);
...
...
@@ -159,13 +161,13 @@ public class GoogleSearch {
}
System
.
out
.
println
(
"title-->"
+
title
);
System
.
out
.
println
(
"url-->"
+
url
);
System
.
out
.
println
(
"desc-->"
+
desc
);
System
.
out
.
println
(
"author-->"
+
authors
);
System
.
out
.
println
(
"cited number-->"
+
citedNumber
);
System
.
out
.
println
(
"cited link-->"
+
citedLinks
);
System
.
out
.
println
(
"related link-->"
+
related
);
//TraceManager.addDev
("title-->"+title);
//TraceManager.addDev
("url-->"+url);
//TraceManager.addDev
("desc-->"+desc);
//TraceManager.addDev
("author-->"+authors);
//TraceManager.addDev
("cited number-->"+citedNumber);
//TraceManager.addDev
("cited link-->"+citedLinks);
//TraceManager.addDev
("related link-->"+related);
gs
.
authors
=
authors
;
gs
.
title
=
title
;
...
...
This diff is collapsed.
Click to expand it.
src/ui/TDiagramMouseManager.java
+
2
−
1
View file @
69238eea
...
...
@@ -54,6 +54,7 @@ import myutil.*;
import
java.util.ArrayList
;
import
ui.window.JDialogSearchBox
;
import
myutil.TraceManager
;
public
class
TDiagramMouseManager
implements
MouseListener
,
MouseMotionListener
{
...
...
@@ -355,7 +356,7 @@ public class TDiagramMouseManager implements MouseListener, MouseMotionListener
selectedMultiComponents
.
add
(
tgc
.
getValue
());
System
.
out
.
println
(
"cac component da select
: "
+
selectedMultiComponents
.
toString
());
//TraceManager.addDev("Selected components
: " + selectedMultiComponents.toString());
}
else
{
if
(
tdp
.
j
.
isShowing
())
...
...
This diff is collapsed.
Click to expand it.
src/ui/window/JDialogSearchBox.java
+
5
−
3
View file @
69238eea
...
...
@@ -21,12 +21,15 @@ import javax.swing.JPanel;
import
javax.swing.JTable
;
import
myutil.GoogleSearch
;
import
myutil.GraphicLib
;
import
java.lang.Object
;
import
java.awt.Desktop
;
import
java.io.IOException
;
import
java.net.URI
;
import
java.net.URISyntaxException
;
import
myutil.GraphicLib
;
import
javax.swing.table.AbstractTableModel
;
import
javax.swing.*
;
...
...
@@ -77,6 +80,7 @@ public class JDialogSearchBox extends javax.swing.JFrame {
public
JDialogSearchBox
(
Frame
_frame
,
String
_title
,
ArrayList
<
String
>
l
)
{
//super(_frame, _title, true);
initComponents
();
GraphicLib
.
centerOnParent
(
this
);
String
s
=
""
;
for
(
int
i
=
0
;
i
<
l
.
size
();
i
++){
addValueListKeyword
(
l
.
get
(
i
));
...
...
@@ -374,7 +378,7 @@ public class JDialogSearchBox extends javax.swing.JFrame {
DefaultTableModel
model
=
(
DefaultTableModel
)
this
.
resultTable
.
getModel
();
int
rowindex
=
resultTable
.
getSelectedRow
();
int
id
=
0
;
System
.
out
.
println
(
rowindex
);
if
(
rowindex
>=
0
)
id
=
(
int
)
resultTable
.
getValueAt
(
rowindex
,
0
);
GoogleSearch
selected
=
null
;
...
...
@@ -432,8 +436,6 @@ public class JDialogSearchBox extends javax.swing.JFrame {
public
void
putGoogleToTable
(
ArrayList
<
GoogleSearch
>
a
)
{
System
.
out
.
println
(
rows
.
size
());
System
.
out
.
println
(
a
.
size
());
int
i
=
this
.
rows
.
size
()+
1
;
for
(
GoogleSearch
gs
:
a
){
this
.
rows
.
add
(
new
Object
[]{
i
,
gs
,
"Google"
});
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment