資源簡介
1.java GUI界面課程設計 2.數據庫為SQL server2008,有數據庫腳本 3.運行已成功并答辯完畢

代碼片段和文件信息
package?whsdu.se.Common;
import?java.awt.Dimension;
import?java.awt.Insets;
import?javax.swing.DefaultDesktopManager;
import?javax.swing.JComponent;
import?javax.swing.JInternalframe;
import?javax.swing.JScrollPane;
import?javax.swing.JViewport;
//多界面加滾動條
class?MDIDesktopManager?extends?DefaultDesktopManager?{
private?MDIDesktopPane?desktop;
public?MDIDesktopManager(MDIDesktopPane?desktop)?{
this.desktop?=?desktop;
}
public?void?endResizingframe(JComponent?f)?{
super.endResizingframe(f);
resizeDesktop();//重新調整窗口大小
}
public?void?endDraggingframe(JComponent?f)?{
super.endDraggingframe(f);
resizeDesktop();//拖動窗口
}
public?void?setNormalSize()?{
JScrollPane?scrollPane?=?getScrollPane();
int?x?=?0;
int?y?=?0;
Insets?scrollInsets?=?getScrollPaneInsets();
if?(scrollPane?!=?null)?{
Dimension?d?=?scrollPane.getVisibleRect().getSize();
if?(scrollPane.getBorder()?!=?null)?{
d.setSize(d.getWidth()?-?scrollInsets.left?-?scrollInsets.right?d.getHeight()
-?scrollInsets.top?-?scrollInsets.bottom);
}
d.setSize(d.getWidth()?-?20?d.getHeight()?-?20);
desktop.setAllSize(x?y);
scrollPane.invalidate();
scrollPane.validate();
}
}
private?Insets?getScrollPaneInsets()?{
JScrollPane?scrollPane?=?getScrollPane();
if?(scrollPane?==?null)
return?new?Insets(0?0?0?0);
else
return?getScrollPane().getBorder().getBorderInsets(scrollPane);
}
private?JScrollPane?getScrollPane()?{
if?(desktop.getParent()?instanceof?JViewport)?{
JViewport?viewPort?=?(JViewport)?desktop.getParent();
if?(viewPort.getParent()?instanceof?JScrollPane)
return?(JScrollPane)?viewPort.getParent();
}
return?null;
}
protected?void?resizeDesktop()?{
int?x?=?0;
int?y?=?0;
JScrollPane?scrollPane?=?getScrollPane();
Insets?scrollInsets?=?getScrollPaneInsets();
if?(scrollPane?!=?null)?{
JInternalframe?allframes[]?=?desktop.getAllframes();
for?(int?i?=?0;?i?ames.length;?i++)?{
if?(allframes[i].getX()?+?allframes[i].getWidth()?>?x)?{
x?=?allframes[i].getX()?+?allframes[i].getWidth();
}
if?(allframes[i].getY()?+?allframes[i].getHeight()?>?y)?{
y?=?allframes[i].getY()?+?allframes[i].getHeight();
}
}
Dimension?d?=?scrollPane.getVisibleRect().getSize();
if?(scrollPane.getBorder()?!=?null)?{
d.setSize(d.getWidth()?-?scrollInsets.left?-?scrollInsets.right?d.getHeight()
-?scrollInsets.top?-?scrollInsets.bottom);
}
if?(x?<=?d.getWidth())
x?=?((int)?d.getWidth())?-?20;
if?(y?<=?d.getHeight())
y?=?((int)?d.getHeight())?-?20;
desktop.setAllSize(x?y);
scrollPane.invalidate();
scrollPane.validate();
}
}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2019-08-29?23:17??C停車場管理系統\
?????文件???????36045??2015-04-18?21:15??C停車場管理系統\java實訓.xmind
?????文件?????????118??2015-04-18?21:15??C停車場管理系統\README.md
?????目錄???????????0??2019-08-29?23:17??C停車場管理系統\數據庫\
?????文件?????3145728??2015-04-18?21:15??C停車場管理系統\數據庫\cardmange.mdf
?????文件?????1048576??2015-04-18?21:15??C停車場管理系統\數據庫\cardmange_log.ldf
?????文件?????????725??2019-07-05?21:54??C停車場管理系統\數據庫\第三階段及第四階段設計.sql
?????目錄???????????0??2019-08-29?23:17??C停車場管理系統\源碼\
?????目錄???????????0??2019-08-29?23:17??C停車場管理系統\源碼\carsituation_man\
?????文件?????????356??2019-07-02?23:36??C停車場管理系統\源碼\carsituation_man\.classpath
?????目錄???????????0??2019-08-29?23:17??C停車場管理系統\源碼\carsituation_man\.myeclipse\
?????目錄???????????0??2019-08-29?23:17??C停車場管理系統\源碼\carsituation_man\.myeclipse\profiler\
?????文件?????????873??2015-04-18?21:15??C停車場管理系統\源碼\carsituation_man\.myeclipse\profiler\Loginfr
?????文件?????????841??2015-04-18?21:15??C停車場管理系統\源碼\carsituation_man\.myeclipse\profiler\Mdif
?????文件?????????375??2015-04-18?21:15??C停車場管理系統\源碼\carsituation_man\.project
?????目錄???????????0??2019-08-29?23:17??C停車場管理系統\源碼\carsituation_man\.settings\
?????文件?????????617??2015-04-18?21:15??C停車場管理系統\源碼\carsituation_man\.settings\org.eclipse.jdt.core.prefs
?????文件???????85790??2019-07-03?15:33??C停車場管理系統\源碼\carsituation_man\123.jpg
?????目錄???????????0??2019-08-29?23:17??C停車場管理系統\源碼\carsituation_man\bin\
?????目錄???????????0??2019-08-29?23:17??C停車場管理系統\源碼\carsituation_man\bin\whsdu\
?????目錄???????????0??2019-08-29?23:17??C停車場管理系統\源碼\carsituation_man\bin\whsdu\se\
?????目錄???????????0??2019-08-29?23:17??C停車場管理系統\源碼\carsituation_man\bin\whsdu\se\Common\
?????文件????????3075??2019-07-05?09:45??C停車場管理系統\源碼\carsituation_man\bin\whsdu\se\Common\MDIDesktopManager.class
?????文件????????3752??2019-07-05?08:09??C停車場管理系統\源碼\carsituation_man\bin\whsdu\se\Common\MDIDesktopPane.class
?????目錄???????????0??2019-08-29?23:17??C停車場管理系統\源碼\carsituation_man\bin\whsdu\se\DAL\
?????文件???????10183??2019-07-05?07:57??C停車場管理系統\源碼\carsituation_man\bin\whsdu\se\DAL\Dal.class
?????目錄???????????0??2019-08-29?23:17??C停車場管理系統\源碼\carsituation_man\bin\whsdu\se\DAO\
?????文件?????????942??2019-07-03?13:40??C停車場管理系統\源碼\carsituation_man\bin\whsdu\se\DAO\charger.class
?????文件????????1881??2019-07-03?13:40??C停車場管理系統\源碼\carsituation_man\bin\whsdu\se\DAO\park.class
?????文件?????????763??2019-07-03?13:40??C停車場管理系統\源碼\carsituation_man\bin\whsdu\se\DAO\sit_infor.class
?????文件????????1861??2019-07-03?13:40??C停車場管理系統\源碼\carsituation_man\bin\whsdu\se\DAO\users.class
............此處省略79個文件信息
評論
共有 條評論