Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
discovery
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
谢捷峰
discovery
Commits
7e9da888
Commit
7e9da888
authored
Jul 30, 2018
by
Nepxion
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改界面
parent
63986ccd
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
122 additions
and
44 deletions
+122
-44
discovery-console-desktop/src/main/java/com/nepxion/discovery/console/desktop/workspace/RouterTopology.java
+2
-1
discovery-console-desktop/src/main/java/com/nepxion/discovery/console/desktop/workspace/ServiceTopology.java
+5
-4
discovery-console-desktop/src/main/java/com/nepxion/discovery/console/desktop/workspace/topology/TopologyEntity.java
+92
-33
discovery-console-desktop/src/main/java/com/nepxion/discovery/console/desktop/workspace/topology/TopologyEntityType.java
+6
-6
discovery-console-desktop/src/main/java/com/nepxion/discovery/console/desktop/workspace/topology/TopologyStyleType.java
+17
-0
No files found.
discovery-console-desktop/src/main/java/com/nepxion/discovery/console/desktop/workspace/RouterTopology.java
View file @
7e9da888
...
@@ -46,6 +46,7 @@ import com.nepxion.discovery.console.desktop.workspace.topology.AbstractTopology
...
@@ -46,6 +46,7 @@ import com.nepxion.discovery.console.desktop.workspace.topology.AbstractTopology
import
com.nepxion.discovery.console.desktop.workspace.topology.LocationEntity
;
import
com.nepxion.discovery.console.desktop.workspace.topology.LocationEntity
;
import
com.nepxion.discovery.console.desktop.workspace.topology.TopologyEntity
;
import
com.nepxion.discovery.console.desktop.workspace.topology.TopologyEntity
;
import
com.nepxion.discovery.console.desktop.workspace.topology.TopologyEntityType
;
import
com.nepxion.discovery.console.desktop.workspace.topology.TopologyEntityType
;
import
com.nepxion.discovery.console.desktop.workspace.topology.TopologyStyleType
;
import
com.nepxion.swing.action.JSecurityAction
;
import
com.nepxion.swing.action.JSecurityAction
;
import
com.nepxion.swing.button.ButtonManager
;
import
com.nepxion.swing.button.ButtonManager
;
import
com.nepxion.swing.button.JBasicButton
;
import
com.nepxion.swing.button.JBasicButton
;
...
@@ -63,7 +64,7 @@ public class RouterTopology extends AbstractTopology {
...
@@ -63,7 +64,7 @@ public class RouterTopology extends AbstractTopology {
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
private
LocationEntity
nodeLocationEntity
=
new
LocationEntity
(
100
,
200
,
200
,
0
);
private
LocationEntity
nodeLocationEntity
=
new
LocationEntity
(
100
,
200
,
200
,
0
);
private
TopologyEntity
serviceNodeEntity
=
new
TopologyEntity
(
TopologyEntityType
.
SERVICE
,
true
,
true
);
private
TopologyEntity
serviceNodeEntity
=
new
TopologyEntity
(
TopologyEntityType
.
SERVICE
,
TopologyStyleType
.
MIDDLE
,
true
);
private
TGraphBackground
background
;
private
TGraphBackground
background
;
private
JBasicComboBox
comboBox
;
private
JBasicComboBox
comboBox
;
...
...
discovery-console-desktop/src/main/java/com/nepxion/discovery/console/desktop/workspace/ServiceTopology.java
View file @
7e9da888
...
@@ -56,6 +56,7 @@ import com.nepxion.discovery.console.desktop.workspace.topology.AbstractTopology
...
@@ -56,6 +56,7 @@ import com.nepxion.discovery.console.desktop.workspace.topology.AbstractTopology
import
com.nepxion.discovery.console.desktop.workspace.topology.LocationEntity
;
import
com.nepxion.discovery.console.desktop.workspace.topology.LocationEntity
;
import
com.nepxion.discovery.console.desktop.workspace.topology.TopologyEntity
;
import
com.nepxion.discovery.console.desktop.workspace.topology.TopologyEntity
;
import
com.nepxion.discovery.console.desktop.workspace.topology.TopologyEntityType
;
import
com.nepxion.discovery.console.desktop.workspace.topology.TopologyEntityType
;
import
com.nepxion.discovery.console.desktop.workspace.topology.TopologyStyleType
;
import
com.nepxion.swing.action.JSecurityAction
;
import
com.nepxion.swing.action.JSecurityAction
;
import
com.nepxion.swing.button.ButtonManager
;
import
com.nepxion.swing.button.ButtonManager
;
import
com.nepxion.swing.button.JClassicButton
;
import
com.nepxion.swing.button.JClassicButton
;
...
@@ -86,10 +87,10 @@ public class ServiceTopology extends AbstractTopology {
...
@@ -86,10 +87,10 @@ public class ServiceTopology extends AbstractTopology {
private
LocationEntity
groupLocationEntity
=
new
LocationEntity
(
120
,
250
,
280
,
0
);
private
LocationEntity
groupLocationEntity
=
new
LocationEntity
(
120
,
250
,
280
,
0
);
private
LocationEntity
nodeLocationEntity
=
new
LocationEntity
(
0
,
0
,
120
,
100
);
private
LocationEntity
nodeLocationEntity
=
new
LocationEntity
(
0
,
0
,
120
,
100
);
private
TopologyEntity
serviceGroupEntity
=
new
TopologyEntity
(
TopologyEntityType
.
SERVICE
,
true
,
true
);
private
TopologyEntity
serviceGroupEntity
=
new
TopologyEntity
(
TopologyEntityType
.
SERVICE
_GROUP
,
TopologyStyleType
.
LARGE
,
true
);
private
TopologyEntity
notServiceGroupEntity
=
new
TopologyEntity
(
TopologyEntityType
.
MQ
,
true
,
true
);
private
TopologyEntity
notServiceGroupEntity
=
new
TopologyEntity
(
TopologyEntityType
.
SERVICE_GROUP
,
TopologyStyleType
.
LARGE
,
true
);
private
TopologyEntity
serviceNodeEntity
=
new
TopologyEntity
(
TopologyEntityType
.
SERVICE
,
true
,
false
);
private
TopologyEntity
serviceNodeEntity
=
new
TopologyEntity
(
TopologyEntityType
.
SERVICE
,
TopologyStyleType
.
MIDDLE
,
false
);
private
TopologyEntity
notServiceNodeEntity
=
new
TopologyEntity
(
TopologyEntityType
.
MQ
,
true
,
false
);
private
TopologyEntity
notServiceNodeEntity
=
new
TopologyEntity
(
TopologyEntityType
.
GATEWAY
,
TopologyStyleType
.
MIDDLE
,
false
);
private
Map
<
String
,
Point
>
groupLocationMap
=
new
HashMap
<
String
,
Point
>();
private
Map
<
String
,
Point
>
groupLocationMap
=
new
HashMap
<
String
,
Point
>();
private
TGraphBackground
background
;
private
TGraphBackground
background
;
...
...
discovery-console-desktop/src/main/java/com/nepxion/discovery/console/desktop/workspace/topology/TopologyEntity.java
View file @
7e9da888
...
@@ -12,63 +12,122 @@ package com.nepxion.discovery.console.desktop.workspace.topology;
...
@@ -12,63 +12,122 @@ package com.nepxion.discovery.console.desktop.workspace.topology;
import
java.awt.Point
;
import
java.awt.Point
;
public
class
TopologyEntity
{
public
class
TopologyEntity
{
public
static
final
String
REGISTRY_LARGE_IMAGE
=
"registry_48.png"
;
public
static
final
String
SERVICE_GROUP_LARGE_IMAGE
=
"service_group_64.png"
;
public
static
final
String
MQ_LARGE_IMAGE
=
"mq_48.png"
;
public
static
final
String
SERVICE_GROUP_MIDDLE_IMAGE
=
"service_group_48.png"
;
public
static
final
String
CACHE_LARGE_IMAGE
=
"cache_48.png"
;
public
static
final
String
SERVICE_GROUP_SMALL_IMAGE
=
"service_group_32.png"
;
public
static
final
String
LOGGER_LARGE_IMAGE
=
"logger_48.png"
;
public
static
final
String
SERVICE_LARGE_IMAGE
=
"service_48.png"
;
public
static
final
String
REFERENCE_GROUP_LARGE_IMAGE
=
"reference_group_64.png"
;
public
static
final
String
REFERENCE_LARGE_IMAGE
=
"reference_48.png"
;
public
static
final
String
REFERENCE_GROUP_MIDDLE_IMAGE
=
"reference_group_48.png"
;
public
static
final
String
REFERENCE_GROUP_SMALL_IMAGE
=
"reference_group_32.png"
;
public
static
final
String
REGISTRY_SMALL_IMAGE
=
"registry_32.png"
;
public
static
final
String
MQ_SMALL_IMAGE
=
"mq_32.png"
;
public
static
final
String
SERVICE_LARGE_IMAGE
=
"service_64.png"
;
public
static
final
String
CACHE_SMALL_IMAGE
=
"cache_32.png"
;
public
static
final
String
SERVICE_MIDDLE_IMAGE
=
"service_48.png"
;
public
static
final
String
LOGGER_SMALL_IMAGE
=
"logger_32.png"
;
public
static
final
String
SERVICE_SMALL_IMAGE
=
"service_32.png"
;
public
static
final
String
SERVICE_SMALL_IMAGE
=
"service_32.png"
;
public
static
final
String
REFERENCE_LARGE_IMAGE
=
"reference_64.png"
;
public
static
final
String
REFERENCE_MIDDLE_IMAGE
=
"reference_48.png"
;
public
static
final
String
REFERENCE_SMALL_IMAGE
=
"reference_32.png"
;
public
static
final
String
REFERENCE_SMALL_IMAGE
=
"reference_32.png"
;
private
TopologyEntityType
type
;
public
static
final
String
GATEWAY_LARGE_IMAGE
=
"gateway_64.png"
;
public
static
final
String
GATEWAY_MIDDLE_IMAGE
=
"gateway_48.png"
;
public
static
final
String
GATEWAY_SMALL_IMAGE
=
"gateway_32.png"
;
private
TopologyEntityType
entityType
;
private
TopologyStyleType
styleType
;
private
String
image
;
private
String
image
;
private
Point
location
;
private
Point
location
;
private
boolean
horizontalPile
;
private
boolean
horizontalPile
;
public
TopologyEntity
(
TopologyEntityType
type
,
boolean
largeStyl
e
,
Point
location
)
{
public
TopologyEntity
(
TopologyEntityType
entityType
,
TopologyStyleType
styleTyp
e
,
Point
location
)
{
initialize
(
type
,
largeStyl
e
);
initialize
(
entityType
,
styleTyp
e
);
this
.
location
=
location
;
this
.
location
=
location
;
}
}
public
TopologyEntity
(
TopologyEntityType
type
,
boolean
largeStyl
e
,
boolean
horizontalPile
)
{
public
TopologyEntity
(
TopologyEntityType
entityType
,
TopologyStyleType
styleTyp
e
,
boolean
horizontalPile
)
{
initialize
(
type
,
largeStyl
e
);
initialize
(
entityType
,
styleTyp
e
);
this
.
horizontalPile
=
horizontalPile
;
this
.
horizontalPile
=
horizontalPile
;
}
}
private
void
initialize
(
TopologyEntityType
type
,
boolean
largeStyle
)
{
private
void
initialize
(
TopologyEntityType
entityType
,
TopologyStyleType
styleType
)
{
this
.
type
=
type
;
this
.
entityType
=
entityType
;
switch
(
type
)
{
this
.
styleType
=
styleType
;
case
REGISTRY:
switch
(
entityType
)
{
image
=
largeStyle
?
REGISTRY_LARGE_IMAGE
:
REGISTRY_SMALL_IMAGE
;
case
SERVICE_GROUP:
break
;
switch
(
styleType
)
{
case
MQ:
case
LARGE:
image
=
largeStyle
?
MQ_LARGE_IMAGE
:
MQ_SMALL_IMAGE
;
image
=
SERVICE_GROUP_LARGE_IMAGE
;
break
;
case
MIDDLE:
image
=
SERVICE_GROUP_MIDDLE_IMAGE
;
break
;
case
SMALL:
image
=
SERVICE_GROUP_SMALL_IMAGE
;
break
;
}
break
;
break
;
case
CACHE:
case
REFERENCE_GROUP:
image
=
largeStyle
?
CACHE_LARGE_IMAGE
:
CACHE_SMALL_IMAGE
;
switch
(
styleType
)
{
break
;
case
LARGE:
case
LOGGER:
image
=
REFERENCE_GROUP_LARGE_IMAGE
;
image
=
largeStyle
?
LOGGER_LARGE_IMAGE
:
LOGGER_SMALL_IMAGE
;
break
;
case
MIDDLE:
image
=
REFERENCE_GROUP_MIDDLE_IMAGE
;
break
;
case
SMALL:
image
=
REFERENCE_GROUP_SMALL_IMAGE
;
break
;
}
break
;
break
;
case
SERVICE:
case
SERVICE:
image
=
largeStyle
?
SERVICE_LARGE_IMAGE
:
SERVICE_SMALL_IMAGE
;
switch
(
styleType
)
{
case
LARGE:
image
=
SERVICE_LARGE_IMAGE
;
break
;
case
MIDDLE:
image
=
SERVICE_MIDDLE_IMAGE
;
break
;
case
SMALL:
image
=
SERVICE_SMALL_IMAGE
;
break
;
}
break
;
break
;
case
REFERENCE:
case
REFERENCE:
image
=
largeStyle
?
REFERENCE_LARGE_IMAGE
:
REFERENCE_SMALL_IMAGE
;
switch
(
styleType
)
{
case
LARGE:
image
=
REFERENCE_LARGE_IMAGE
;
break
;
case
MIDDLE:
image
=
REFERENCE_MIDDLE_IMAGE
;
break
;
case
SMALL:
image
=
REFERENCE_SMALL_IMAGE
;
break
;
}
break
;
case
GATEWAY:
switch
(
styleType
)
{
case
LARGE:
image
=
GATEWAY_LARGE_IMAGE
;
break
;
case
MIDDLE:
image
=
GATEWAY_MIDDLE_IMAGE
;
break
;
case
SMALL:
image
=
GATEWAY_SMALL_IMAGE
;
break
;
}
break
;
break
;
}
}
}
}
public
TopologyEntityType
getType
()
{
public
TopologyEntityType
getEntityType
()
{
return
type
;
return
entityType
;
}
public
TopologyStyleType
getStyleType
()
{
return
styleType
;
}
}
public
String
getImage
()
{
public
String
getImage
()
{
...
...
discovery-console-desktop/src/main/java/com/nepxion/discovery/console/desktop/workspace/topology/TopologyEntityType.java
View file @
7e9da888
...
@@ -10,10 +10,9 @@ package com.nepxion.discovery.console.desktop.workspace.topology;
...
@@ -10,10 +10,9 @@ package com.nepxion.discovery.console.desktop.workspace.topology;
*/
*/
public
enum
TopologyEntityType
{
public
enum
TopologyEntityType
{
REGISTRY
,
SERVICE_GROUP
,
MQ
,
REFERENCE_GROUP
,
CACHE
,
SERVICE
,
LOGGER
,
REFERENCE
,
SERVICE
,
GATEWAY
REFERENCE
}
}
\ No newline at end of file
discovery-console-desktop/src/main/java/com/nepxion/discovery/console/desktop/workspace/topology/TopologyStyleType.java
0 → 100644
View file @
7e9da888
package
com
.
nepxion
.
discovery
.
console
.
desktop
.
workspace
.
topology
;
/**
* <p>Title: Nepxion Discovery</p>
* <p>Description: Nepxion Discovery</p>
* <p>Copyright: Copyright (c) 2017-2050</p>
* <p>Company: Nepxion</p>
* @author Haojun Ren
* @version 1.0
*/
public
enum
TopologyStyleType
{
LARGE
,
MIDDLE
,
SMALL
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment