Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update Mr.lu 's workments #4

Open
wants to merge 15 commits into
base: create_For_Mr_Chen
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .classpath
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="UI"/>
<classpathentry kind="src" path="plugin"/>
<classpathentry kind="src" path="UI"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/>
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
<classpathentry kind="output" path="bin/default"/>
Expand Down
11 changes: 11 additions & 0 deletions .settings/org.eclipse.buildship.core.prefs
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
arguments=
auto.sync=false
build.scans.enabled=false
connection.gradle.distribution=GRADLE_DISTRIBUTION(VERSION(4.10.3))
connection.project.dir=
eclipse.preferences.version=1
gradle.user.home=
java.home=
jvm.arguments=
offline.mode=false
override.workspace.settings=true
show.console.view=true
show.executions.view=true
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# 基于VPCS的桌面运维ETL 系统,满足对deta cache的可视化运维管理 基于VPCS思想的 进行2.0项目版本实践。

##### 已经完成任务:采用ETL最新资源包。已测试调通可运行。罗瑶光。20190211
##### 已经完成任务:已修改运维logo,已创造第一个运维节点 名称为获取缓存服务器信息。罗瑶光。20190212

##### 任务:vpcs 独有成份进行布局正在做。
##### 任务:调通 etl 软件在这个工程中。
##### 任务:第一个节点《缓存服务器链接节点》设计,从容易开始
##### 任务:第一个节点《缓存服务器链接节点》无版权图案片做logo 直接在互联网上搜无版权的修改下,新巧就可以了
##### 任务:第一个节点 通过 ip + 端口 + 安全认证 + 简单的字符串口号 链接一台或者缓存服务器,形成一个list box 树。
Expand Down Expand Up @@ -43,6 +45,7 @@
##### 任务:
##### 任务:
##### 任务:
![实例](https://github.com/yaoguangluo/Deta_Cache_Devops_App/blob/master/testconnection.png)



109 changes: 54 additions & 55 deletions UI/GUIBuild/GUIsample3.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,23 +46,23 @@
import org.LYG.GUI.nodeView.cacuString;
import org.LYG.GUI.nodeView.nodeShow;
import org.LYG.GUI.platForm.unicornJSplitPane;
public class GUIsample3 extends JApplet implements MouseMotionListener, MouseListener,ItemListener,ActionListener,Runnable{
public class GUIsample3 extends JApplet implements MouseMotionListener, MouseListener
, ItemListener, ActionListener, Runnable{
private static final long serialVersionUID = 5270675501794340912L;
public GUIsample3() {
//getContentPane().setBackground(new Color(218,112,214));
getContentPane().setBackground(new Color(255,255,255));
}
public int w,h;
int flash=0;
int count=0;
public int w, h;
int flash = 0;
int count = 0;
String currentNodeName;
int currentNodeID;
LinkList thislist;
LinkNode first;
int currentx,currenty;
int choose=0;
int oldx,oldy;
int newx,newy;
int currentx, currenty;
int choose = 0;
int oldx, oldy;
int newx, newy;
int isOperation = 0;
String treeNodeName;
nodeShow nodeview;
Expand All @@ -76,19 +76,19 @@ public GUIsample3() {
JScrollPane rightdownscrollPane;
JScrollPane rightrightscrollPane;
thisCanvas canvas;
PopupMenu popupMenu1,nodeMenu,itemMenu;
PopupMenu popupMenu1, nodeMenu, itemMenu;
MenuItem menuItem1;
MenuItem configre,run,show,dnode,dline;
Thread thread,thread1;
MenuItem configre, run, show, dnode, dline;
Thread thread, thread1;
public void run() {
try {
Thread.sleep(100);
} catch (InterruptedException e1) {
e1.printStackTrace();
}
nodeproject.setBounds(0, 0,leftsplitPane.getWidth(),leftsplitPane.getDividerLocation());
nodeproject.setBounds(0, 0, leftsplitPane.getWidth(), leftsplitPane.getDividerLocation());
nodeproject.jPanel.newimg = nodeproject.img.getScaledInstance(nodeproject.getWidth()
,nodeproject.getHeight(),java.awt.Image.SCALE_SMOOTH );
, nodeproject.getHeight(), java.awt.Image.SCALE_SMOOTH);
nodeproject.jPanel.update(getGraphics());
nodeproject.validate();
while(true){
Expand All @@ -105,6 +105,7 @@ public void start(){
thread.start();
}
}

public void stop() {
}

Expand All @@ -122,6 +123,7 @@ public void propertyChange(java.beans.PropertyChangeEvent evt) {
}
}
});

mainsplitPane.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
public void propertyChange(java.beans.PropertyChangeEvent evt) {
if (evt.getPropertyName().equals(JSplitPane.DIVIDER_LOCATION_PROPERTY)) {
Expand All @@ -134,6 +136,7 @@ public void propertyChange(java.beans.PropertyChangeEvent evt) {
}
}
});

righttopscrollPane.addComponentListener(new ComponentListener(){
public void componentHidden(ComponentEvent arg0) {}
public void componentMoved(ComponentEvent arg0) {}
Expand All @@ -142,14 +145,11 @@ public void componentResized(ComponentEvent arg0) {
}
public void componentShown(ComponentEvent arg0) {}
});

getContentPane().addComponentListener(new ComponentListener(){

public void componentHidden(ComponentEvent arg0) {}

public void componentMoved(ComponentEvent arg0) {}

public void componentResized(ComponentEvent arg0) {
// TODO Auto-generated method stub
w=getContentPane().getWidth();
h=getContentPane().getHeight();
mainsplitPane.setBounds(10, 50, w-20, h-80);
Expand All @@ -165,7 +165,7 @@ public void componentResized(ComponentEvent arg0) {
nodeproject.validate();

mainsplitPane.validate();
System.out.println(w+"<>"+h);
System.out.println(w + "<>" + h);
}

public void componentShown(ComponentEvent arg0) {
Expand Down Expand Up @@ -221,27 +221,27 @@ public void actionPerformed(ActionEvent e) {
e1.printStackTrace();
}
node.thisface.thispanel.setLocation(node.x, node.y);
node.thisface.thispanel.setSize(300, 300);//setBounds(0, 0, node.x+300,node.y+200);
node.thisface.thispanel.setSize(600, 480);//setBounds(0, 0, node.x+300,node.y+200);
node.thisface.thispanel.setResizable(true);
node.thisface.thispanel.setClosable(true);
node.thisface.thispanel.jsp.setBounds(0, 0, node.thisface.thispanel.getWidth()-10
, node.thisface.thispanel.getHeight()-45);
node.thisface.thispanel.jsp.setBounds(0, 0, node.thisface.thispanel.getWidth() - 10
, node.thisface.thispanel.getHeight() - 45);
node.thisface.thispanel.jp.setPreferredSize(new Dimension(800,600));
canvas.add(node.thisface.thispanel);
node.thisface.thispanel.setVisible(true);
node.thisface.thispanel.validate();
new OSGI_chansfer(node,first);
}
while(node.next != null){
node=node.next;
if(node.name.equals(currentNodeName)&&node.ID==currentNodeID){
node = node.next;
if(node.name.equals(currentNodeName)&&node.ID == currentNodeID){
try {
node.thisface.config();
} catch (IOException e1) {
e1.printStackTrace();
}
node.thisface.thispanel.setLocation(node.x, node.y);
node.thisface.thispanel.setSize(300, 300);//setBounds(0, 0, node.x+300,node.y+200);
node.thisface.thispanel.setSize(600, 480);//setBounds(0, 0, node.x+300,node.y+200);
node.thisface.thispanel.setResizable(true);
node.thisface.thispanel.setClosable(true);node.thisface.thispanel.jsp.setBounds(0, 0
, node.thisface.thispanel.getWidth()-10, node.thisface.thispanel.getHeight()-45);
Expand Down Expand Up @@ -273,9 +273,8 @@ public void actionPerformed(ActionEvent e) {
} catch (InterruptedException e3) {
e3.printStackTrace();
}

}
while(node.next!=null){
while(null != node.next){
node=node.next;
if(node.name.equals(currentNodeName)&&node.ID==currentNodeID){
try {
Expand Down Expand Up @@ -441,39 +440,39 @@ public void mouseEntered(MouseEvent arg0) {}
public void mouseExited(MouseEvent arg0) {}

public void mousePressed(MouseEvent arg0) {
isOperation = 1;
//System.out.println(arg0.getX()+"|"+arg0.getY());
isOperation=1;
System.out.println(arg0.getX()+"|"+arg0.getY());
oldx = arg0.getX();
oldy = arg0.getY();
currentx = arg0.getX();
currenty = arg0.getY();
currentNodeName = new ChooseCheck().chooseCheckname(first,arg0);
currentNodeID = new ChooseCheck().chooseCheckid(first,arg0);
currentx=arg0.getX();
currenty=arg0.getY();
currentNodeName=new ChooseCheck().chooseCheckname(first,arg0);
currentNodeID=new ChooseCheck().chooseCheckid(first,arg0);
}


public void mouseReleased(MouseEvent arg0){
isOperation = 0;
currentx = arg0.getX();
currenty = arg0.getY();
first = new Sort().sort(first);
LinkNode node = new LinkNode();
node = first;
if(node != null){
if(node.rightchoose && !node.leftchoose){
if(oldx == arg0.getX() && oldy == arg0.getY()){
isOperation=0;
currentx=arg0.getX();
currenty=arg0.getY();
first=new Sort().sort(first);
LinkNode node=new LinkNode();
node=first;
if(node!=null){
if(node.rightchoose&&!node.leftchoose){
if(oldx==arg0.getX()&&oldy==arg0.getY()){
nodeMenu.show(this, arg0.getX(), arg0.getY());
}
else{
new CheckRange(first,node,arg0);
}
}
node.setchoose(false);
node.rightchoose = false;
while(node.next != null){
node = node.next;
if(node.rightchoose && !node.leftchoose){
if(oldx == arg0.getX()&&oldy==arg0.getY()){
node.rightchoose=false;
while(node.next!=null){
node=node.next;
if(node.rightchoose&&!node.leftchoose){
if(oldx==arg0.getX()&&oldy==arg0.getY()){
nodeMenu.show(this, arg0.getX(), arg0.getY());
}
else{
Expand All @@ -496,23 +495,23 @@ public void mouseDragged(MouseEvent e) {
currentx=e.getX();
currenty=e.getY();
LinkNode node=new LinkNode();
first=new Sort().sort(first);
node=first;
first = new Sort().sort(first);
node = first;
Graphics g = getGraphics();
Graphics2D g2 = (Graphics2D)g;
g2.setColor(Color.black);
if(node!=null){
if(node.leftchoose&&!node.rightchoose){
if(node != null){
if(node.leftchoose && !node.rightchoose){
node.setxy(e.getX(),e.getY());
new DynamicLineUpdater().exec(first,node);
this.update();
}
if(!node.leftchoose&&node.rightchoose){
if(!node.leftchoose && node.rightchoose){
new DrawArrow(g2,oldx, oldy, e.getX(), e.getY());
this.update(g);
}
while(node.next!=null){
node=node.next;
while(node.next != null){
node = node.next;
if(node.leftchoose&&!node.rightchoose){
node.setxy(e.getX(),e.getY());
new DynamicLineUpdater().exec(first,node);
Expand Down Expand Up @@ -674,7 +673,7 @@ public void init(){
this.resize(w,h);
}
private void CreatMap() throws IOException {
w=1420;
w=1400;
h=800;
getContentPane().setLayout(null);
UIManager.put("SplitPaneUI","org.LYG.GUI.platForm.unicornSplitPaneUI");
Expand Down
Loading