forked from fanruan/design
zack
8 years ago
12 changed files with 441 additions and 220 deletions
@ -1 +1 @@
|
||||
package com.fr.design.icon;
/**
* Created by IntelliJ IDEA.
* Author : Richer
* Version: 6.5.6
* Date: 12-12-18
* Time: 上午9:42
* 用于保存所有图标路径的类
*/
public class IconPathConstants {
private IconPathConstants() {
}
public static final String ADD_POPMENU_ICON_PATH = "/com/fr/design/images/control/addPopup.png";
public static final String DS_ICON_PATH = "/com/fr/design/images/data/datasource.png";
public static final String CLASS_TD_ICON_PATH = "/com/fr/design/images/data/source/classTableData.png";
public static final String EMB_TD_ICON_PATH = "/com/fr/design/images/data/dataTable.png";
public static final String DS_RELATION_TD_ICON_PATH = "/com/fr/design/images/data/multi.png";
public static final String FILE_TD_ICON_PATH = "/com/fr/design/images/data/file.png";
public static final String DS_TREE_TD_ICON_PATH = "/com/fr/design/images/data/tree.png";
public static final String DS_QUERY_ICON_PATH = "/com/fr/design/images/data/database.png";
public static final String PREVIEW_ICON_PATH = "/com/fr/design/images/m_file/preview.png";
public static final String TD_EDIT_ICON_PATH = "/com/fr/design/images/control/edit.png";
public static final String TD_REMOVE_ICON_PATH = "/com/fr/base/images/cell/control/remove.png";
public static final String TD_CONNECTION_ICON_PATH = "/com/fr/design/images/m_web/connection.png";
public static final String SP_SHOW_ICON_PATH = "/com/fr/design/images/data/store_procedure.png";
public static final String STD_SHOW_ICON_PATH = "/com/fr/design/images/data/dock/serverdatabase.png";
public static final String XMLA_ICON_PATH = "/com/fr/design/images/data/cube.png";
public static final String FORBID_ICON_PATH ="/com/fr/web/images/form/forbid.png";
} |
||||
package com.fr.design.icon;
/**
* Created by IntelliJ IDEA.
* Author : Richer
* Version: 6.5.6
* Date: 12-12-18
* Time: 上午9:42
* 用于保存所有图标路径的类
*/
public class IconPathConstants {
private IconPathConstants() {
}
public static final String ADD_POPMENU_ICON_PATH = "/com/fr/design/images/control/addPopup.png";
public static final String DS_ICON_PATH = "/com/fr/design/images/data/datasource.png";
public static final String CLASS_TD_ICON_PATH = "/com/fr/design/images/data/source/classTableData.png";
public static final String EMB_TD_ICON_PATH = "/com/fr/design/images/data/dataTable.png";
public static final String DS_RELATION_TD_ICON_PATH = "/com/fr/design/images/data/multi.png";
public static final String FILE_TD_ICON_PATH = "/com/fr/design/images/data/file.png";
public static final String DS_TREE_TD_ICON_PATH = "/com/fr/design/images/data/tree.png";
public static final String DS_QUERY_ICON_PATH = "/com/fr/design/images/data/database.png";
public static final String PREVIEW_ICON_PATH = "/com/fr/design/images/m_file/preview.png";
public static final String TD_EDIT_ICON_PATH = "/com/fr/design/images/control/edit.png";
public static final String TD_EL_SHARE_HELP_ICON_PATH = "/com/fr/design/images/control/help_open.png";
public static final String TD_EL_SHARE_CLOSE_ICON_PATH = "/com/fr/design/images/control/help_close.png";
public static final String TD_REMOVE_ICON_PATH = "/com/fr/base/images/cell/control/remove.png";
public static final String TD_CONNECTION_ICON_PATH = "/com/fr/design/images/m_web/connection.png";
public static final String SP_SHOW_ICON_PATH = "/com/fr/design/images/data/store_procedure.png";
public static final String STD_SHOW_ICON_PATH = "/com/fr/design/images/data/dock/serverdatabase.png";
public static final String XMLA_ICON_PATH = "/com/fr/design/images/data/cube.png";
public static final String FORBID_ICON_PATH ="/com/fr/web/images/form/forbid.png";
} |
After Width: | Height: | Size: 801 B |
After Width: | Height: | Size: 895 B |
@ -0,0 +1,73 @@
|
||||
package com.fr.design.mainframe; |
||||
|
||||
import com.fr.design.dialog.UIDialog; |
||||
import com.fr.design.gui.icontainer.UIScrollPane; |
||||
import com.fr.design.gui.itextarea.UITextArea; |
||||
|
||||
import javax.swing.*; |
||||
import java.awt.*; |
||||
|
||||
/** |
||||
* @author zack |
||||
* @date 2016-10-14 |
||||
* @since 8.0 |
||||
*/ |
||||
public class ElementCaseHelpDialog extends UIDialog { |
||||
|
||||
private static final int OUTER_WIDTH = 190; |
||||
private static final int OUTER_HEIGHT = 120; |
||||
|
||||
|
||||
private String helpMsg; |
||||
private UIScrollPane helpArea; |
||||
|
||||
|
||||
public ElementCaseHelpDialog(Frame parent, String helpMsg) { |
||||
super(parent); |
||||
this.helpMsg = helpMsg; |
||||
setUndecorated(true); |
||||
initHelpArea(); |
||||
JPanel panel = (JPanel) getContentPane(); |
||||
initComponents(panel); |
||||
setSize(new Dimension(OUTER_WIDTH, OUTER_HEIGHT)); |
||||
} |
||||
|
||||
private void initHelpArea() { |
||||
UITextArea textArea = new UITextArea(helpMsg); |
||||
textArea.setEditable(false); |
||||
textArea.setBorder(null); |
||||
helpArea = new UIScrollPane(textArea); |
||||
helpArea.setBounds(0, 0, 190, 120); |
||||
helpArea.setBorder(null); |
||||
} |
||||
|
||||
private void initComponents(JPanel contentPane) { |
||||
contentPane.setLayout(new BorderLayout()); |
||||
add(helpArea, BorderLayout.CENTER); |
||||
} |
||||
|
||||
/** |
||||
* 打开帮助框 |
||||
*/ |
||||
public void showWindow() { |
||||
setVisible(true); |
||||
this.setResizable(false); |
||||
} |
||||
|
||||
/** |
||||
* 略 |
||||
*/ |
||||
@Override |
||||
public void checkValid() throws Exception { |
||||
|
||||
} |
||||
|
||||
public void setLocationRelativeTo(JFrame c, int x, int y) { |
||||
int dx = 0, dy = 0; |
||||
Point compLocation = c.getLocationOnScreen();//获取设计器Jframe坐标作为相对位置原点
|
||||
setLocation(dx + x, dy + y); |
||||
dx = compLocation.x; |
||||
dy = compLocation.y + c.getRootPane().getY();//加上底层容器的y坐标(其实就是设计器最上方图标栏的高度)
|
||||
setLocation(dx + x, dy + y); |
||||
} |
||||
} |
Loading…
Reference in new issue