自由飞翔

我在仰望,java之上

统计

留言簿(2)

我关注的blog

阅读排行榜

评论排行榜

2012年9月29日 #

编码至高法则-高内聚低耦合

     摘要: 此法则适合所有语言,咱们以JavaScript和Java两个角度分析一下这个东东。 一、javascript 有这样的一个页面,js、css代码都写在html页面中。 例如:gnj.html v1版本Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-...  阅读全文

posted @ 2019-09-11 15:59 GavinMiao 阅读(202) | 评论 (0)编辑 收藏

Jgoodies FormLayout 小结


一、列与行的参数都由三个部分组成:对齐方式、固定尺寸、调整方式。
1.对齐方式:
1)列对齐有left, center, right, fill.默认fill
2)行对齐有:top, center, bottom, fill. 其中fill表示填充至整个区域。默认center。
2.固定尺寸:
pref表示preferred size,适当大小,即首选尺寸大小。
min表示minimum size,
dlu 表示dialog units,
px, pt, in, mm, cm)分别表示Pixel, Points, Inches, Millimeter, Centimeter。
3. 调整方式:
二、CellConstraints:
cc.xywh(3, 1, 3, 1):表示3列,1行,colspan=3,rowspan=1
三、FormLayout:
  1.FormLayout layout = new FormLayout(
   new ColumnSpec[]{
     FormSpecs.DEFAULT_COLSPEC,
     FormSpecs.GLUE_COLSPEC,
     FormSpecs.DEFAULT_COLSPEC,
     FormSpecs.GLUE_COLSPEC,
     FormSpecs.DEFAULT_COLSPEC,
     FormSpecs.GLUE_COLSPEC},
   new RowSpec[]{
     FormSpecs.DEFAULT_ROWSPEC,
     FormSpecs.GLUE_ROWSPEC,
     FormSpecs.DEFAULT_ROWSPEC,
     FormSpecs.GLUE_ROWSPEC,
     FormSpecs.DEFAULT_ROWSPEC,
     FormSpecs.GLUE_ROWSPEC
   }
  );
2.

FormLayout layout = new FormLayout( 
        "right:pref, 6dlu, 50dlu, 4dlu, center:50dlu", // columns
        "pref, 3dlu, pref, 3dlu, pref"); // rows   





参考文章:
http://hi.baidu.com/lijunwyf/item/a18d95f719ff01da6225d26f

posted @ 2012-09-29 11:29 GavinMiao 阅读(1304) | 评论 (0)编辑 收藏