91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 5.14KB
    文件類型: .zip
    金幣: 1
    下載: 0 次
    發布日期: 2021-02-20
  • 語言: Java
  • 標簽:

資源簡介

Java 制作階梯布局管理器(基礎篇-實例304).zip

資源截圖

代碼片段和文件信息

package?com.mingrisoft.layoutmanager;

import?java.awt.Component;
import?java.awt.Container;
import?java.awt.Dimension;
import?java.awt.Insets;
import?java.awt.LayoutManager;

public?class?LadderLayout?implements?LayoutManager?{
????
????@Override
????public?void?addLayoutComponent(String?name?Component?comp)?{
????}
????
????@Override
????public?void?layoutContainer(Container?parent)?{
????????Insets?insets?=?parent.getInsets();
????????int?maxWidth?=?parent.getWidth()?-?(insets.left?+?insets.right);
????????int?maxHeight?=?parent.getHeight()?-?(insets.top?+?insets.bottom);
????????int?count?=?parent.getComponentCount();
????????for?(int?i?=?0;?i?????????????Component?component?=?parent.getComponent(i);
????????????if?(component.isVisible())?{
????????????????Dimension?size?=?component.getPreferredSize();
????????????????int?x?=?maxWidth?/?count?*?i;
????????????????int?y?=?maxHeight?/?count?*?i;
????????????????component.setBounds(x?y?size

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????????232??2010-09-11?17:00??.classpath
?????文件?????????379??2010-09-11?17:00??.project
?????文件????????1979??2013-11-21?08:41??bin\com\mingrisoft\layoutmanager\LadderLayout.class
?????文件?????????843??2013-11-21?08:41??bin\com\mingrisoft\layoutmanager\LadderLayoutTest$1.class
?????文件????????1996??2013-11-21?08:41??bin\com\mingrisoft\layoutmanager\LadderLayoutTest.class
?????文件????????1406??2010-09-11?17:00??src\com\mingrisoft\layoutmanager\LadderLayout.java
?????文件????????1757??2010-09-11?17:00??src\com\mingrisoft\layoutmanager\LadderLayoutTest.java

評論

共有 條評論