testlabelimage4.java

来自「A translator that converts Qt Designer U」· Java 代码 · 共 58 行

JAVA
58
字号
//
// This file was generated by the ui2swt tool (http://ui2swt.sourceforge.net/)
//
// Date:
//   Sun Jun 17 17:26:28 EST 2007
//
// Source:
//   file:/C:/Documents and Settings/James and Louisa/My Documents/Development/workspace/ui2swt/src/test/ui/TestLabelImage4.ui
//

package ui2swt.test;

import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;

public class TestLabelImage4 extends Composite
{
    public Label label;
    public Label label_2;

    public TestLabelImage4( Composite iParent, int iStyle )
    {
        super(iParent, iStyle);
        this.setSize(400,300);
        GridLayout l_gridLayout;
        l_gridLayout = new GridLayout();
        this.setLayout(l_gridLayout);
        l_gridLayout.numColumns = 2;
        l_gridLayout.marginLeft = 9;
        l_gridLayout.marginTop = 9;
        l_gridLayout.marginRight = 9;
        l_gridLayout.marginBottom = 9;
        l_gridLayout.horizontalSpacing = 6;
        l_gridLayout.verticalSpacing = 6;
        this.label = new Label(this,SWT.NONE);
        this.label.setText("Image:");
        this.label_2 = new Label(this,SWT.NONE);
        this.label_2.setImage(new Image(this.label_2.getDisplay(),"TestImage1.png"));
        GridData l_gridData;
        l_gridData = new GridData();
        l_gridData.horizontalAlignment = GridData.FILL;
        l_gridData.grabExcessHorizontalSpace = true;
        l_gridData.verticalAlignment = GridData.CENTER;
        l_gridData.grabExcessVerticalSpace = true;
        this.label.setLayoutData(l_gridData);
        l_gridData = new GridData();
        l_gridData.horizontalAlignment = GridData.FILL;
        l_gridData.grabExcessHorizontalSpace = true;
        l_gridData.verticalAlignment = GridData.CENTER;
        l_gridData.grabExcessVerticalSpace = true;
        this.label_2.setLayoutData(l_gridData);
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?