Commit bd49b2ab by Nepxion

修改界面

parent 62ba3be9
......@@ -10,8 +10,9 @@ package com.nepxion.discovery.console.desktop;
*/
import java.awt.Dimension;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.nepxion.discovery.console.desktop.controller.ServiceController;
import com.nepxion.discovery.console.desktop.icon.ConsoleIconFactory;
......@@ -23,9 +24,10 @@ import com.nepxion.swing.style.texture.shrink.JGreenOutlookTextureStyle;
public class ConsoleFrame extends JBasicFrame {
private static final long serialVersionUID = 1L;
private static final Logger LOG = LoggerFactory.getLogger(ConsoleFrame.class);
public ConsoleFrame() {
super(ConsoleLocale.getString("title") + " [" + ServiceController.getDiscoveryType() + " " + ConsoleLocale.getString("discovery_center") + "] [" + ServiceController.getConfigType() + " " + ConsoleLocale.getString("config_center") + "]", ConsoleIconFactory.getSwingIcon("ribbon/navigator_nepxion.png"), new Dimension(1280, 900));
super(ConsoleLocale.getString("title") + " " + getSubTitle(), ConsoleIconFactory.getSwingIcon("ribbon/navigator_nepxion.png"), new Dimension(1280, 900));
}
public void launch() {
......@@ -36,15 +38,18 @@ public class ConsoleFrame extends JBasicFrame {
getContentPane().add(reflectionHierarchy);
addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent e) {
}
});
setExtendedState(ConsoleFrame.MAXIMIZED_BOTH);
setVisible(true);
toFront();
}
private static String getSubTitle() {
try {
return "[" + ServiceController.getDiscoveryType() + " " + ConsoleLocale.getString("discovery_center") + "] [" + ServiceController.getConfigType() + " " + ConsoleLocale.getString("config_center") + "]";
} catch (Exception e) {
LOG.error("Not connnect to Discovery Console", e);
return "[" + ConsoleLocale.getString("not_connnect_to_console") + "]";
}
}
}
\ No newline at end of file
......@@ -76,5 +76,6 @@ start_y=起始点Y坐标
horizontal_gap=水平间距
vertical_gap=垂直间距
not_connnect_to_console=无法连接到控制平台
initialize_component=初始化界面
initialize_component_failure=初始化界面失败
\ No newline at end of file
......@@ -76,5 +76,6 @@ start_y=\u8d77\u59cb\u70b9Y\u5750\u6807
horizontal_gap=\u6c34\u5e73\u95f4\u8ddd
vertical_gap=\u5782\u76f4\u95f4\u8ddd
not_connnect_to_console=\u65e0\u6cd5\u8fde\u63a5\u5230\u63a7\u5236\u5e73\u53f0
initialize_component=\u521d\u59cb\u5316\u754c\u9762
initialize_component_failure=\u521d\u59cb\u5316\u754c\u9762\u5931\u8d25
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment