資源簡介
用java寫的有界面的停車場管理系統,壓縮包里有數據庫文件,還有java源碼,導進去就能跑起來,按照軟件工程導論模式寫的文檔也包含在里面了,絕版不坑,10分都嫌少!

代碼片段和文件信息
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;
public?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??2016-01-01?16:31??數據庫\
?????文件?????3145728??2015-04-19?12:15??數據庫\cardmange.mdf
?????文件?????1048576??2015-04-19?12:15??數據庫\cardmange_log.ldf
?????文件?????????993??2015-04-19?12:15??數據庫\第三階段及第四階段設計.sql
?????目錄???????????0??2015-12-31?15:16??源碼\
?????目錄???????????0??2016-01-01?16:31??源碼\carsituation_man\
?????文件?????????356??2015-11-15?11:53??源碼\carsituation_man\.classpath
?????目錄???????????0??2015-12-31?15:16??源碼\carsituation_man\.myeclipse\
?????目錄???????????0??2016-01-01?16:31??源碼\carsituation_man\.myeclipse\profiler\
?????文件?????????873??2015-04-19?12:15??源碼\carsituation_man\.myeclipse\profiler\Loginfr
?????文件?????????841??2015-04-19?12:15??源碼\carsituation_man\.myeclipse\profiler\Mdif
?????文件?????????375??2015-04-19?12:15??源碼\carsituation_man\.project
?????目錄???????????0??2016-01-01?16:31??源碼\carsituation_man\.settings\
?????文件?????????617??2015-04-19?12:15??源碼\carsituation_man\.settings\org.eclipse.jdt.core.prefs
?????目錄???????????0??2015-12-31?15:16??源碼\carsituation_man\bin\
?????目錄???????????0??2015-12-31?15:16??源碼\carsituation_man\bin\whsdu\
?????目錄???????????0??2015-12-31?15:16??源碼\carsituation_man\bin\whsdu\se\
?????目錄???????????0??2016-01-01?16:31??源碼\carsituation_man\bin\whsdu\se\Common\
?????文件????????3075??2015-11-15?14:53??源碼\carsituation_man\bin\whsdu\se\Common\MDIDesktopManager.class
?????文件????????3752??2015-11-15?14:53??源碼\carsituation_man\bin\whsdu\se\Common\MDIDesktopPane.class
?????目錄???????????0??2016-01-01?16:31??源碼\carsituation_man\bin\whsdu\se\DAL\
?????文件???????10187??2015-11-15?13:03??源碼\carsituation_man\bin\whsdu\se\DAL\Dal.class
?????目錄???????????0??2016-01-01?16:31??源碼\carsituation_man\bin\whsdu\se\DAO\
?????文件?????????942??2015-11-15?12:07??源碼\carsituation_man\bin\whsdu\se\DAO\charger.class
?????文件????????1881??2015-11-15?12:07??源碼\carsituation_man\bin\whsdu\se\DAO\park.class
?????文件?????????763??2015-11-15?12:07??源碼\carsituation_man\bin\whsdu\se\DAO\sit_infor.class
?????文件????????1861??2015-11-15?12:07??源碼\carsituation_man\bin\whsdu\se\DAO\users.class
?????目錄???????????0??2016-01-01?16:31??源碼\carsituation_man\bin\whsdu\se\UI\
?????文件????????3039??2015-11-15?12:07??源碼\carsituation_man\bin\whsdu\se\UI\Chargefr
?????文件????????2308??2015-11-15?12:07??源碼\carsituation_man\bin\whsdu\se\UI\ComIdentityfr
?????文件????????1836??2015-11-15?12:07??源碼\carsituation_man\bin\whsdu\se\UI\ComIdentityfr
............此處省略74個文件信息
- 上一篇:eshop網上商城系統
- 下一篇:軟件設計大作業
評論
共有 條評論