lming95
2008-11-19 09:45
浏览 279
已采纳

解释下这段代码

public void createControl(Composite composite)
{
fParent = composite;
setHeadingForeground(fWf.getColor("__blackColor"));
if(fScrollable)
{
ShowFocusScrolledComposite showfocusscrolledcomposite = new ShowFocusScrolledComposite(fParent, 768);
if(isVerticalFit())
{
showfocusscrolledcomposite.setExpandHorizontal(true);
showfocusscrolledcomposite.setExpandVertical(true);
}
initializeScrollBars(showfocusscrolledcomposite);
fControl1 = showfocusscrolledcomposite;
} else
{
fControl1 = new Composite(fParent, 0);
GridLayout gridlayout = new GridLayout();
gridlayout.marginHeight = 0;
gridlayout.marginWidth = 0;
fControl1.setLayout(gridlayout);
}
}
[b]问题补充:[/b]
public void createControl(Composite composite)
{
fParent = composite;
setHeadingForeground(fWf.getColor("__blackColor"));
if(fScrollable)
{
ShowFocusScrolledComposite showfocusscrolledcomposite = new ShowFocusScrolledComposite(fParent, 768);
if(isVerticalFit())
{
showfocusscrolledcomposite.setExpandHorizontal(true);
showfocusscrolledcomposite.setExpandVertical(true);
}
initializeScrollBars(showfocusscrolledcomposite);
fControl1 = showfocusscrolledcomposite;
} else
{
fControl1 = new Composite(fParent, 0);
GridLayout gridlayout = new GridLayout();
gridlayout.marginHeight = 0;
gridlayout.marginWidth = 0;
fControl1.setLayout(gridlayout);
}
}

详细分析一下,好吗?

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

2条回答 默认 最新

相关推荐 更多相似问题