Skip to content

Commit a1998d7

Browse files
author
yaoguangluo
committed
test connection yaoguangluo
1 parent 54ef5e8 commit a1998d7

File tree

4 files changed

+26
-32
lines changed

4 files changed

+26
-32
lines changed

UI/GUIBuild/GUIsample3.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ public void actionPerformed(ActionEvent e) {
221221
e1.printStackTrace();
222222
}
223223
node.thisface.thispanel.setLocation(node.x, node.y);
224-
node.thisface.thispanel.setSize(300, 300);//setBounds(0, 0, node.x+300,node.y+200);
224+
node.thisface.thispanel.setSize(600, 480);//setBounds(0, 0, node.x+300,node.y+200);
225225
node.thisface.thispanel.setResizable(true);
226226
node.thisface.thispanel.setClosable(true);
227227
node.thisface.thispanel.jsp.setBounds(0, 0, node.thisface.thispanel.getWidth() - 10
@@ -241,7 +241,7 @@ public void actionPerformed(ActionEvent e) {
241241
e1.printStackTrace();
242242
}
243243
node.thisface.thispanel.setLocation(node.x, node.y);
244-
node.thisface.thispanel.setSize(300, 300);//setBounds(0, 0, node.x+300,node.y+200);
244+
node.thisface.thispanel.setSize(600, 480);//setBounds(0, 0, node.x+300,node.y+200);
245245
node.thisface.thispanel.setResizable(true);
246246
node.thisface.thispanel.setClosable(true);node.thisface.thispanel.jsp.setBounds(0, 0
247247
, node.thisface.thispanel.getWidth()-10, node.thisface.thispanel.getHeight()-45);
@@ -495,23 +495,23 @@ public void mouseDragged(MouseEvent e) {
495495
currentx=e.getX();
496496
currenty=e.getY();
497497
LinkNode node=new LinkNode();
498-
first=new Sort().sort(first);
499-
node=first;
498+
first = new Sort().sort(first);
499+
node = first;
500500
Graphics g = getGraphics();
501501
Graphics2D g2 = (Graphics2D)g;
502502
g2.setColor(Color.black);
503-
if(node!=null){
504-
if(node.leftchoose&&!node.rightchoose){
503+
if(node != null){
504+
if(node.leftchoose && !node.rightchoose){
505505
node.setxy(e.getX(),e.getY());
506506
new DynamicLineUpdater().exec(first,node);
507507
this.update();
508508
}
509-
if(!node.leftchoose&&node.rightchoose){
509+
if(!node.leftchoose && node.rightchoose){
510510
new DrawArrow(g2,oldx, oldy, e.getX(), e.getY());
511511
this.update(g);
512512
}
513-
while(node.next!=null){
514-
node=node.next;
513+
while(node.next != null){
514+
node = node.next;
515515
if(node.leftchoose&&!node.rightchoose){
516516
node.setxy(e.getX(),e.getY());
517517
new DynamicLineUpdater().exec(first,node);

plugin/org/cache/devops/getCacheInfo/CacheInfoNodePanel.java

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
import java.awt.event.ActionEvent;
33
import java.awt.event.ActionListener;
44
import javax.swing.JButton;
5+
import javax.swing.JLabel;
6+
import javax.swing.JTextField;
57

68
import org.LYG.GUI.OSGI.*;
79

@@ -20,33 +22,25 @@ public CacheInfoNodePanel(final CacheInfoNodeRun thisrun){
2022
jp=new Panel();
2123
jp.setLayout(null);
2224
jp.setBackground(Color.white);
23-
JButton button = new JButton("Finish");
24-
button.setBounds(0, 0, 100, 30);
25-
button.addActionListener(new ActionListener(){
26-
public void actionPerformed(ActionEvent e){
27-
System.out.println(e.getSource());
28-
close=true;
29-
thisrun.value=1;
30-
}
31-
});
25+
26+
//add new connection
27+
JLabel label= new JLabel("²âÊÔÁ´½Ó£º");
28+
label.setBounds(2, 2, 80, 30);
29+
30+
JTextField ipport= new JTextField("xxx.xxx.xxx.xxx:xxxxx", 18);
31+
ipport.setBounds(2+85, 2, 200, 30);
3232

33-
jp.add(button);
34-
JButton readfile= new JButton("Write File");
35-
readfile.setBounds(0, 35, 100, 65);
36-
readfile.addActionListener(new ActionListener(){
37-
public void actionPerformed(ActionEvent arg0) {
38-
filedialog=new FileDialog(new Frame(),"filechoose",FileDialog.LOAD);
39-
filedialog.setVisible(true);
40-
thisrun.filepath=filedialog.getDirectory()+filedialog.getFile();
41-
System.out.println(thisrun.filepath);
42-
}
43-
});
33+
JButton jbutton=new JButton("È·¶¨");
34+
jbutton.setBounds(2, 2+35, 80, 30);
4435

45-
jp.add(readfile);
36+
jp.add(label);
37+
jp.add(ipport);
38+
jp.add(jbutton);
39+
4640
jsp.add(jp);
4741
close=false;
4842
this.setClosable(true);
49-
}
43+
}
5044
public void config(){
5145
System.out.println("configued");
5246
}

plugin/org/cache/devops/getCacheInfo/CacheInfoNodeView.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public CacheInfoNodeView(){
1515
}
1616
public void view(){
1717
jsp = new ScrollPane();
18-
jp=new Panel();
18+
jp = new Panel();
1919
jp.setBackground(Color.yellow);
2020
//
2121
JScrollPane j = new JScrollPane();

testconnection.png

25.6 KB
Loading

0 commit comments

Comments
 (0)