微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

java.awt.GridBagConstraints的实例源码

项目:openjdk-jdk10    文件java_awt_GridBagConstraints.java   
protected GridBagConstraints getobject() {
    GridBagConstraints gbc = new GridBagConstraints();
    gbc.gridx = 1;
    gbc.gridy = 2;
    gbc.gridwidth = 3;
    gbc.gridheight = 4;
    gbc.weightx = 0.1;
    gbc.weighty = 0.2;
    gbc.anchor = GridBagConstraints.norTH;
    gbc.fill = GridBagConstraints.VERTICAL;
    gbc.insets.top = 1;
    gbc.insets.left = 2;
    gbc.insets.right = 3;
    gbc.insets.bottom = 4;
    gbc.ipadx = -1;
    gbc.ipady = -2;
    return gbc;
}
项目:incubator-netbeans    文件BasicSearchForm.java   
public void addRow(JComponent label,JComponent component) {

            GridBagConstraints c = new GridBagConstraints();
            c.gridx = 0;
            c.anchor = GridBagConstraints.norTHWEST;
            c.gridy = row;
            c.weightx = 0;
            c.weighty = 0;
            c.insets = new Insets(5,5,5);
            add(label,c);

            c.gridx = 1;
            c.weightx = 1;
            c.fill = GridBagConstraints.HORIZONTAL;
            add(component,c);

            row++;
        }
项目:AgentWorkbench    文件DynFormText.java   
/**
 * This method initializes this
 * @return void
 */
private void initialize() {
    GridBagConstraints gridBagConstraints11 = new GridBagConstraints();
    gridBagConstraints11.gridx = 0;
    gridBagConstraints11.fill = GridBagConstraints.HORIZONTAL;
    gridBagConstraints11.weightx = 1.0;
    gridBagConstraints11.gridy = 1;

    GridBagConstraints gridBagConstraints = new GridBagConstraints();
    gridBagConstraints.fill = GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    gridBagConstraints.gridwidth = 1;

    this.setSize(300,200);
    this.setLayout(new GridBagLayout());
    this.add(getJScrollPaneTextVersion(),gridBagConstraints);
    this.add(getJPanelBottom(),gridBagConstraints11);
}
项目:rapidminer    文件ManageDatabaseDriversDialog.java   
private void add(String labelKey,JComponent component,JComponent button) {
    GridBagConstraints c = new GridBagConstraints();
    c.anchor = 23;
    c.weightx = 0.5D;
    c.weighty = 1.0D;
    c.fill = 1;
    c.gridheight = 1;
    ResourceLabel label = new ResourceLabel("manage_database_drivers." + labelKey,new Object[0]);
    label.setLabelFor(component);
    c.gridwidth = 0;
    this.add(label,c);
    c.insets = new Insets(0,0);
    if(button == null) {
        c.gridwidth = 0;
        this.add(component,c);
    } else {
        c.gridwidth = -1;
        c.weightx = 1.0D;
        this.add(component,c);
        c.gridwidth = 0;
        c.weightx = 0.0D;
        c.insets = new Insets(0,0);
        this.add(button,c);
    }

}
项目:rapidminer    文件SimilarityTable.java   
public SimilarityTable(distanceMeasure measure,ExampleSet exampleSet) {
    GridBagLayout layout = new GridBagLayout();
    setLayout(layout);
    GridBagConstraints c = new GridBagConstraints();
    c.fill = GridBagConstraints.BOTH;
    c.weightx = 1;
    c.weighty = 1;
    c.gridwidth = GridBagConstraints.REMAINDER;

    similarityTable = new ExtendedJTable();
    SimilarityTableModel model = new SimilarityTableModel(measure,exampleSet);
    similarityTable.setModel(model);

    JScrollPane tablePane = new ExtendedJScrollPane(similarityTable);
    tablePane.setBorder(null);
    layout.setConstraints(tablePane,c);
    add(tablePane);
}
项目:incubator-netbeans    文件HierarchyTopComponent.java   
@NonNull
private static Pair<JComponent,GridBagConstraints> constrainedComponent(
        @NonNull final JComponent component,final int fill,final double weightx,@NonNull final Insets insets) {
    final GridBagConstraints c = new GridBagConstraints();
    c.gridx = GridBagConstraints.RELATIVE;
    c.gridy = 0;
    c.gridwidth = 1;
    c.gridheight = 1;
    c.weightx = weightx;
    c.weighty = 0;
    c.anchor = GridBagConstraints.WEST;
    c.fill = fill;
    c.insets = insets;
    return Pair.<JComponent,GridBagConstraints>of(component,c);
}
项目:oxygen-dita-translation-package-builder    文件ShowModifiedFilesDialog.java   
/**
* Private constructor
*/
private ShowModifiedFilesDialog() {
  setLayout(new GridBagLayout());
  modifiedFiles = new JTextArea(10,40);
  modifiedFiles.setLineWrap(true);
  modifiedFiles.setWrapStyleWord(true);
  modifiedFiles.setEditable(false);

  JScrollPane scroll = new JScrollPane(modifiedFiles);
  scroll.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);

  GridBagConstraints gbc = new GridBagConstraints();
  gbc.gridx = 0;
  gbc.gridy = 1;
  gbc.gridwidth = 1;
  gbc.gridheight = 1;
  gbc.weightx = 0;
  gbc.weighty = 0;
  gbc.fill = GridBagConstraints.BOTH;
  gbc.anchor = GridBagConstraints.LINE_START;
  add(scroll,gbc);
}
项目:incubator-netbeans    文件DetectPanel.java   
@Override
public void readSettings(WizardDescriptor settings) {           
    sources = null;
    sourcesstring = null;
    javadoc = null;
    javadocString = null;
    this.wiz = settings;
    this.component.progresspanel.setVisible (true);
    this.component.progressLabel.setVisible (true);

    this.progressHandle = ProgressHandleFactory.createHandle(NbBundle.getMessage(DetectPanel.class,"TXT_PlatfromDetectProgress"));
    this.component.progresspanel.removeAll();
    this.component.progresspanel.setLayout (new GridBagLayout ());
    GridBagConstraints c = new GridBagConstraints ();
    c.gridx = c.gridy = GridBagConstraints.RELATIVE;
    c.gridheight = c.gridwidth = GridBagConstraints.REMAINDER;
    c.fill = GridBagConstraints.HORIZONTAL;
    c.weightx = 1.0;
    JComponent pc = ProgressHandleFactory.createProgressComponent(this.progressHandle);
    ((GridBagLayout)this.component.progresspanel.getLayout ()).setConstraints(pc,c);
    this.component.progresspanel.add (pc);
    this.progressHandle.start ();
    task.schedule(0);
}
项目:rapidminer    文件CardHeaderPanel.java   
public CardHeaderPanel(String i18nKey) {
    this.setLayout(new GridBagLayout());
    GridBagConstraints gbc = new GridBagConstraints();
    gbc.gridx = 0;
    gbc.gridy = 0;
    gbc.insets = new Insets(20,20,0);
    JLabel label = new JLabel(I18N.getGUILabel(i18nKey,new Object[0])) {
        private static final long serialVersionUID = 1L;

        public void paintComponent(Graphics g) {
            SwingTools.disableClearType(this);
            ((Graphics2D)g).setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);
            super.paintComponent(g);
        }
    };
    label.setFont(OPEN_SANS_SEMIBOLD_18);
    label.setHorizontalTextPosition(2);
    this.add(label,gbc);
    ++gbc.gridx;
    gbc.fill = 2;
    gbc.weightx = 1.0D;
    this.add(new JLabel(),gbc);
    this.setopaque(false);
    this.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(0,30,20),BorderFactory.createMatteBorder(0,1,GettingStartedDialog.VERY_LIGHT_GRAY)));
}
项目:LogisticApp    文件MenuContratacaoTransporteFrame.java   
private void initializeComboBoxes() throws Exception {
    List<LocalidadeVO> localidades = this.contratacaoTransporte.recuperarLocalidades();

    this.cBoxOrigem = new JComboBox<LocalidadeVO>();

    GridBagConstraints gbc_comboBox = new GridBagConstraints();
    gbc_comboBox.gridwidth = 2;
    gbc_comboBox.fill = GridBagConstraints.BOTH;
    gbc_comboBox.insets = new Insets(0,5);
    gbc_comboBox.gridx = 7;
    gbc_comboBox.gridy = 3;
    this.panelSecond.add(this.cBoxOrigem,gbc_comboBox);

    this.startComboBoxValues(this.cBoxOrigem,localidades);

    this.cBoxDestino = new JComboBox<LocalidadeVO>();
    GridBagConstraints gbc_comboBox_1 = new GridBagConstraints();
    gbc_comboBox_1.gridwidth = 2;
    gbc_comboBox_1.insets = new Insets(0,5);
    gbc_comboBox_1.fill = GridBagConstraints.HORIZONTAL;
    gbc_comboBox_1.gridx = 7;
    gbc_comboBox_1.gridy = 7;
    this.panelSecond.add(this.cBoxDestino,gbc_comboBox_1);

    this.startComboBoxValues(this.cBoxDestino,localidades);
}
项目:LogisticApp    文件LocalidadeFrame.java   
private void initializeButtons() {
    this.btnVoltar = new JButton("< Voltar");
    GridBagConstraints gbc_button = new GridBagConstraints();
    gbc_button.gridwidth = 2;
    gbc_button.insets = new Insets(0,5);
    gbc_button.gridx = 2;
    gbc_button.gridy = 1;
    this.panelFirst.add(this.btnVoltar,gbc_button);

    this.btnFeito = new JButton("Feito");
    GridBagConstraints gbc_btnFeito = new GridBagConstraints();
    gbc_btnFeito.insets = new Insets(0,5);
    gbc_btnFeito.gridx = 8;
    gbc_btnFeito.gridy = 1;
    this.panelFirst.add(this.btnFeito,gbc_btnFeito);

    this.btnFeito.addActionListener(this);
    this.btnVoltar.addActionListener(this);
}
项目:openjdk-jdk10    文件PolicyTool.java   
/**
 * display the warning log
 */
void displayWarningLog(Window w) {

    ToolDialog wd = new ToolDialog
            (PolicyTool.getMessage("Warning"),tool,this,true);

    // find the location of the PolicyTool gui
    Point location = ((w == null) ?
            getLocationOnScreen() : w.getLocationOnScreen());
    //wd.setBounds(location.x + 50,location.y + 50,500,100);
    wd.setLayout(new GridBagLayout());

    JTextArea ta = new JTextArea();
    ta.setEditable(false);
    for (int i = 0; i < tool.warnings.size(); i++) {
        ta.append(tool.warnings.elementAt(i));
        ta.append(PolicyTool.getMessage("NEWLINE"));
    }
    addNewComponent(wd,ta,0.0,GridBagConstraints.BOTH,BottOM_PADDING);
    ta.setFocusable(false);

    JButton okButton = new JButton(PolicyTool.getMessage("OK"));
    ActionListener okListener = new CancelButtonListener(wd);
    okButton.addActionListener(okListener);
    addNewComponent(wd,okButton,GridBagConstraints.VERTICAL,LR_PADDING);

    wd.getRootPane().setDefaultButton(okButton);
    wd.getRootPane().registerKeyboardAction(okListener,escKey,JComponent.WHEN_IN_FOCUSED_WINDOW);

    wd.pack();
    wd.setLocationRelativeto(w);
    wd.setVisible(true);
}
项目:incubator-netbeans    文件Progresspanel.java   
/** Creates new form Progresspanel */
public Progresspanel() {
    initComponents();
    handle = ProgressHandleFactory.createHandle(
            NbBundle.getMessage(ImportProjectAction.class,"CTL_ProgressDialogTitle")); // NOI18N
    progress = ProgressHandleFactory.createProgressComponent(handle);
    setLayout(new GridBagLayout());
    setPreferredSize(new Dimension(450,80));
    GridBagConstraints gridBagConstraints = new GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new Insets(0,5);
    add(progress,gridBagConstraints);
}
项目:incubator-netbeans    文件DesktopImpl.java   
private void setViewComponent( Component component) {
    if (viewComponent == component) {
        return;
    }
    if (viewComponent != null) {
        desktop.remove(viewComponent);
    }
    viewComponent = component;
    if (viewComponent != null) {
        GridBagConstraints constr = new GridBagConstraints();
        constr.gridx = 1;
        constr.gridy = 1;
        constr.fill = GridBagConstraints.BOTH;
        constr.weightx = 1;
        constr.weighty = 1;
        constr.anchor = GridBagConstraints.CENTER;
        Insets insets = UIManager.getInsets("nb.desktop.view.insets"); //NOI18N
        if( null != insets )
            constr.insets = insets;
        desktop.add(component,constr);
    }
    layeredPane.revalidate();
    layeredPane.repaint();
}
项目:oxygen-git-plugin    文件ChangesPanel.java   
/**
 * Adds the switchView button the the panel
 * 
 * @param gbc
 *          - the constraints used for this component
 */
private void addSwitchViewButton(GridBagConstraints gbc) {
    gbc.insets = new Insets(UIConstants.COMPONENT_TOP_PADDING,UIConstants.COMPONENT_LEFT_PADDING,UIConstants.COMPONENT_BottOM_PADDING,UIConstants.COMPONENT_RIGHT_PADDING);
    gbc.anchor = GridBagConstraints.EAST;
    gbc.fill = GridBagConstraints.NONE;
    gbc.gridx = 2;
    gbc.gridy = 0;
    gbc.weightx = 0;
    gbc.weighty = 0;
    JToolBar toolbar = new JToolBar();
    switchViewButton = new ToolbarButton(null,false);
    switchViewButton.setToolTipText(translator.getTranslation(Tags.CHANGE_TREE_VIEW_BUTTON_TOOLTIP));
    URL resource = currentviewmode == Resourcesviewmode.FLAT_VIEW 
        ? getClass().getResource(ImageConstants.TREE_VIEW)
        : getClass().getResource(ImageConstants.TABLE_VIEW);
    if (resource != null) {
      ImageIcon icon = (ImageIcon) imageUtilities.loadIcon(resource);
      switchViewButton.setIcon(icon);
    }
    toolbar.add(switchViewButton);
    toolbar.setFloatable(false);
    toolbar.setopaque(false);
    this.add(toolbar,gbc);

}
项目:Reinickendorf_SER316    文件TaigaProjectListWizardStep.java   
/**
 * Create the panel.
 */
public TaigaProjectListWizardStep() {
    GridBagLayout gridBagLayout = new GridBagLayout();
    gridBagLayout.columnWidths = new int[]{365,0};
    gridBagLayout.rowHeights = new int[]{0,0};
    gridBagLayout.columnWeights = new double[]{1.0,Double.MIN_VALUE};
    gridBagLayout.rowWeights = new double[]{0.0,1.0,Double.MIN_VALUE};
    setLayout(gridBagLayout);

    JLabel lblChooseAProject = new JLabel("Choose a project from the list below:");
    GridBagConstraints gbc_lblChooseAProject = new GridBagConstraints();
    gbc_lblChooseAProject.insets = new Insets(0,0);
    gbc_lblChooseAProject.gridx = 0;
    gbc_lblChooseAProject.gridy = 0;
    add(lblChooseAProject,gbc_lblChooseAProject);

    GridBagConstraints gbc_projectList = new GridBagConstraints();
    gbc_projectList.fill = GridBagConstraints.BOTH;
    gbc_projectList.gridx = 0;
    gbc_projectList.gridy = 1;
    add(projectList,gbc_projectList);
}
项目:GIFKR    文件ProgressFrame.java   
public ProgressFrame() {

    initializeComponents();
    addActionListeners();

    setLayout(new GridBagLayout());
    GridBagConstraints gbc = ViewUtils.createGBC();
    gbc.fill = GridBagConstraints.NONE;

    add(progresstext,gbc);
    gbc.gridy++;

    add(cancelButton,gbc);

    setSize(500,200);
    setLocationRelativeto(null);
    setUndecorated(true);
    setBackground(bg);
}
项目:ObsidianSuite    文件TimelineFrame.java   
private JPanel createRightPane()
{
    JPanel rightPanel = new JPanel();
    rightPanel.setLayout(new GridBagLayout());

    GridBagConstraints c = new GridBagConstraints();
    c.gridx = 0;
    c.gridy = 0;
    rightPanel.add(controller.keyframeController.panel,c);
    c.gridx = 0;
    c.gridy = 1;
    c.fill = GridBagConstraints.HORIZONTAL;
    rightPanel.add(actionsPanel,c);

    return rightPanel;
}
项目:AgentWorkbench    文件ProjectInfo.java   
/**
 * Switch JPanel for the version of the project between edit and view mode.
 */
public void switchJPanelVersion() {

    GridBagConstraints gbc_jPanelVersion = new GridBagConstraints();
    gbc_jPanelVersion.fill = GridBagConstraints.BOTH;
    gbc_jPanelVersion.gridheight = 5;
    gbc_jPanelVersion.gridx = 0;
    gbc_jPanelVersion.gridy = 0;

    if (this.isversionEdit==true) {
        this.getJPanelUpdateOptions().remove(this.getJPanelVersionEdit());
        this.getJPanelUpdateOptions().add(this.getJPanelVersion(),gbc_jPanelVersion);
        this.getLabelVersionInfo().setText(this.currProject.getVersion@R_142_4045@ion().toString());
        this.isversionEdit = false;
    } else {
        this.getJPanelUpdateOptions().remove(this.getJPanelVersion());
        this.getJPanelUpdateOptions().add(this.getJPanelVersionEdit(),gbc_jPanelVersion);
        this.getJPanelVersionEdit().updateVersion@R_142_4045@ion();
        this.isversionEdit = true;
    }
    this.validate();
    this.repaint();
}
项目:incubator-netbeans    文件InstallationDetailsDialog.java   
private void initComponents() {
    setLayout(new GridBagLayout());

    detailsTreeTable = new NbiTreeTable(new InstallationDetailsTreeTableModel());
    detailsTreeTable.setShowVerticalLines(false);
    detailsTreeTable.setopaque(false);
    detailsTreeTable.setTableHeader(null);
    detailsTreeTable.setRowHeight(detailsTreeTable.getRowHeight() + 4);
    detailsTreeTable.setIntercellSpacing(new Dimension(0,0));
    detailsTreeTable.setTreeColumnCellRenderer(new InstallationDetailsTreeColumnCellRenderer(detailsTreeTable));
    detailsTreeTable.getColumnModel().getColumn(1).setMaxWidth(200);
    detailsTreeTable.getColumnModel().getColumn(1).setMinWidth(200);
    detailsTreeTable.getColumnModel().getColumn(1).setCellRenderer(new InstallationStatusCellRenderer());
    detailsTreeTable.setRowSelectionAllowed(false);
    detailsTreeTable.setColumnSelectionAllowed(false);
    detailsTreeTable.setCellSelectionEnabled(false);

    detailsScrollPane = new NbiScrollPane(detailsTreeTable);

    add(detailsScrollPane,new GridBagConstraints(0,GridBagConstraints.CENTER,new Insets(11,11,11),0));
}
项目:AgentWorkbench    文件FeaturePanel.java   
/**
 * Initialize.
 */
private void initialize() {

    GridBagLayout gridBagLayout = new GridBagLayout();
    gridBagLayout.columnWidths = new int[]{0,Double.MIN_VALUE};
    gridBagLayout.rowWeights = new double[]{1.0,Double.MIN_VALUE};
    this.setLayout(gridBagLayout);
    GridBagConstraints gbc_jScrollPaneProjectFeatures = new GridBagConstraints();
    gbc_jScrollPaneProjectFeatures.insets = new Insets(0,5);
    gbc_jScrollPaneProjectFeatures.fill = GridBagConstraints.BOTH;
    gbc_jScrollPaneProjectFeatures.gridx = 0;
    gbc_jScrollPaneProjectFeatures.gridy = 0;
    this.add(this.getJScrollPaneProjectFeatures(),gbc_jScrollPaneProjectFeatures);
    GridBagConstraints gbc_jPanelFeatureButtons = new GridBagConstraints();
    gbc_jPanelFeatureButtons.insets = new Insets(0,0);
    gbc_jPanelFeatureButtons.fill = GridBagConstraints.BOTH;
    gbc_jPanelFeatureButtons.gridx = 1;
    gbc_jPanelFeatureButtons.gridy = 0;
    this.add(this.getJPanelFeatureButtons(),gbc_jPanelFeatureButtons);

}
项目:AgentWorkbench    文件EnvironmentModel.java   
/**
 * Initialize.
 */
private void initialize() {
    GridBagLayout gridBagLayout = new GridBagLayout();
    gridBagLayout.columnWidths = new int[] { 0,0 };
    gridBagLayout.rowHeights = new int[] { 0,0 };
    gridBagLayout.columnWeights = new double[] { 1.0,Double.MIN_VALUE };
    gridBagLayout.rowWeights = new double[] { 0.0,Double.MIN_VALUE };
    setLayout(gridBagLayout);
    GridBagConstraints gbc_jPanelSimulationEnvironment = new GridBagConstraints();
    gbc_jPanelSimulationEnvironment.insets = new Insets(10,10,0);
    gbc_jPanelSimulationEnvironment.anchor = GridBagConstraints.norTH;
    gbc_jPanelSimulationEnvironment.fill = GridBagConstraints.HORIZONTAL;
    gbc_jPanelSimulationEnvironment.gridx = 0;
    gbc_jPanelSimulationEnvironment.gridy = 0;
    add(getJPanelSimulationEnvironment(),gbc_jPanelSimulationEnvironment);
    GridBagConstraints gbc_jPanelTimeModelSelection = new GridBagConstraints();
    gbc_jPanelTimeModelSelection.anchor = GridBagConstraints.WEST;
    gbc_jPanelTimeModelSelection.insets = new Insets(10,0);
    gbc_jPanelTimeModelSelection.fill = GridBagConstraints.VERTICAL;
    gbc_jPanelTimeModelSelection.gridx = 0;
    gbc_jPanelTimeModelSelection.gridy = 1;
    add(getJPanelTimeModelSelection(),gbc_jPanelTimeModelSelection);

}
项目:incubator-netbeans    文件Attribute.java   
private void setLabelPanel(JPanel panel,GridBagConstraints c) {
    // []
    c.gridy++;
    c.anchor = GridBagConstraints.CENTER;
    c.insets = new Insets(0,LARGE_SIZE,TINY_SIZE,0);
    panel.add(new JLabel(),c);

    // left
    panel.add(createLabel(i18n("LBL_Left")),c); // NOI18N

    // center
    panel.add(createLabel(i18n("LBL_Center")),c); // NOI18N

    // right
    panel.add(createLabel(i18n("LBL_Right")),c); // NOI18N
}
项目:jdk8u-jdk    文件JDK8048887.java   
public TestDialog() {
    JPanel panel = new JPanel(new GridBagLayout());
    GridBagConstraints gbc = new GridBagConstraints();
    for (int i=0; i < Xs.length; i++) {
        gbc.gridx = Xs[i];
        gbc.gridy = 100 - gbc.gridx;
        panel.add(new MyComponent(),gbc);
    }
    getRootPane().getContentPane().add(panel);
    pack();
}
项目:AgentWorkbench    文件ThreadMonitorMetricsTableTab.java   
/**
 * Initialize.
 */
private void initialize() {
    GridBagLayout gridBagLayout = new GridBagLayout();
    gridBagLayout.columnWidths = new int[]{450,0};
    gridBagLayout.rowHeights = new int[] {241,15,Double.MIN_VALUE};
    setLayout(gridBagLayout);
    GridBagConstraints gbc_scrollPaneTable = new GridBagConstraints();
    gbc_scrollPaneTable.fill = GridBagConstraints.BOTH;
    gbc_scrollPaneTable.insets = new Insets(0,0);
    gbc_scrollPaneTable.gridx = 0;
    gbc_scrollPaneTable.gridy = 0;
    this.add(getScrollPaneTable(),gbc_scrollPaneTable);
    GridBagConstraints gbc_JPanelFilter = new GridBagConstraints();
    gbc_JPanelFilter.insets = new Insets(0,0);
    gbc_JPanelFilter.anchor = GridBagConstraints.soUTH;
    gbc_JPanelFilter.fill = GridBagConstraints.HORIZONTAL;
    gbc_JPanelFilter.gridx = 0;
    gbc_JPanelFilter.gridy = 1;
    this.add(getJPanelFilter(),gbc_JPanelFilter);
    GridBagConstraints gbc_JPanelOptions = new GridBagConstraints();
    gbc_JPanelOptions.fill = GridBagConstraints.HORIZONTAL;
    gbc_JPanelOptions.anchor = GridBagConstraints.soUTH;
    gbc_JPanelOptions.gridx = 0;
    gbc_JPanelOptions.gridy = 2;
    add(getJPanelOptions(),gbc_JPanelOptions);
}
项目:oxygen-git-plugin    文件WorkingcopySelectionPanel.java   
/**
 * Adds the label to the panel
 * 
 * @param gbc
 *          - the constraints used for this component
 */
private void addLabel(GridBagConstraints gbc) {
    gbc.insets = new Insets(UIConstants.COMPONENT_TOP_PADDING,UIConstants.COMPONENT_RIGHT_PADDING);
    gbc.anchor = GridBagConstraints.WEST;
    gbc.fill = GridBagConstraints.NONE;
    gbc.gridx = 0;
    gbc.gridy = 0;
    gbc.weightx = 0;
    gbc.weighty = 0;
    this.add(new JLabel(translator.getTranslation(Tags.WORKING_copY_LABEL)),gbc);

}
项目:jdk8u-jdk    文件ServiceDialog.java   
public SidesPanel() {
    super();

    GridBagLayout gridbag = new GridBagLayout();
    GridBagConstraints c = new GridBagConstraints();

    setLayout(gridbag);
    setBorder(BorderFactory.createTitledBorder(strTitle));

    c.fill = GridBagConstraints.BOTH;
    c.insets = compInsets;
    c.weighty = 1.0;
    c.gridwidth = GridBagConstraints.REMAINDER;

    ButtonGroup bg = new ButtonGroup();
    rbOneside = new IconRadioButton("radiobutton.oneside","oneside.png",true,bg,this);
    rbOneside.addActionListener(this);
    addToGB(rbOneside,gridbag,c);
    rbTumble = new IconRadioButton("radiobutton.tumble","tumble.png",false,this);
    rbTumble.addActionListener(this);
    addToGB(rbTumble,c);
    rbDuplex = new IconRadioButton("radiobutton.duplex","duplex.png",this);
    rbDuplex.addActionListener(this);
    c.gridwidth = GridBagConstraints.REMAINDER;
    addToGB(rbDuplex,c);
}
项目:incubator-netbeans    文件BasicSearchForm.java   
public void addEmptyLine() {
    GridBagConstraints c = new GridBagConstraints();
    c.gridx = 0;
    c.gridy = row;
    c.gridwidth = 2;
    c.fill = GridBagConstraints.HORIZONTAL;
    c.weighty = 1;
    c.weightx = 0.1;
    JLabel emptyLabel = new JLabel();
    emptyLabel.setPreferredSize(new Dimension(0,0));
    emptyLabel.setMinimumSize(new Dimension(0,0));
    add(emptyLabel,c);
    row++;
}
项目:nbreleaseplugin    文件VersionUpdaterPanel.java   
private void insertValue(JComponent value) {
    GridBagConstraints c = new GridBagConstraints();
    c.gridy = nextrow++;
    c.anchor = GridBagConstraints.PAGE_START;
    c.fill = GridBagConstraints.HORIZONTAL;
    c.gridx = 1;
    c.weightx = 1.0;
    c.ipady = 5;
    c.ipadx = 10;
    add(value,c);
}
项目:incubator-netbeans    文件OptionsPanel.java   
private void addFakeButton () {
    /* i don't kNow a better workaround */
    GridBagConstraints gbc = new GridBagConstraints();
    gbc.fill = GridBagConstraints.BOTH;
    gbc.weightx = 1.0;
    gbc.weighty = 1.0;
    gbc.gridy = 0;
    pCategories2.add (new javax.swing.JLabel (""),gbc);
}
项目:openjdk-jdk10    文件ServiceDialog.java   
public SidesPanel() {
    super();

    GridBagLayout gridbag = new GridBagLayout();
    GridBagConstraints c = new GridBagConstraints();

    setLayout(gridbag);
    setBorder(BorderFactory.createTitledBorder(strTitle));

    c.fill = GridBagConstraints.BOTH;
    c.insets = compInsets;
    c.weighty = 1.0;
    c.gridwidth = GridBagConstraints.REMAINDER;

    ButtonGroup bg = new ButtonGroup();
    rbOneside = new IconRadioButton("radiobutton.oneside",c);
}
项目:Proj4    文件JSpaceSettlersInfoPanel.java   
public JSpaceSettlersInfoPanel(SpaceSettleRSSimulator simulator) {
    super();

       //setPreferredSize(new Dimension(100,800));

    constraints = new GridBagConstraints();
    //constraints.fill = GridBagConstraints.BOTH;
    constraints.insets = new Insets(10,10);
    setLayout(new GridBagLayout());

    constraints.gridx = 0;
    constraints.gridy = 0;
    globalInfo = new GlobalInfoPanel();
    add(globalInfo,constraints);
       teamComponents = new HashMap<String,TeamInfoPanel>();

    // populate the team hash map the first time it is called with a valid simulator object
    int teamNum = 1;
       for (Team team : simulator.getTeams()) {
        TeamInfoPanel tInfo = new TeamInfoPanel(team);
        teamComponents.put(team.getTeamName(),tInfo);
        constraints.gridx = 0;
        constraints.gridy = teamNum;
           constraints.gridwidth = GridBagConstraints.REMAINDER;
           add(tInfo,constraints);
           teamNum++;
       }

       objectPanel = new ObjectInfoPanel();
    constraints.gridx = 0;
    constraints.gridy = simulator.getTeams().size() + 1;
       constraints.gridwidth = GridBagConstraints.REMAINDER;
       add(objectPanel,constraints);
}
项目:Pixie    文件GUILabelingTool.java   
/**
 * Adds a label which is not needed for active purposes. It just aligns
 * north all the other components.
 */
private void addButtonsAlignComponent() {
    GridBagConstraints gbc = new GridBagConstraints();
    gbc.gridx = 0;
    gbc.gridy = 100;        // put the label as low as possible
    gbc.anchor = java.awt.GridBagConstraints.norTHWEST;
    gbc.weighty = 0.5;
    jPObjList.add(jLAlignnorth,gbc);
}
项目:incubator-netbeans    文件RSSFeed.java   
private JComponent buildProxyPanel() {
    Component header = getContentHeader();
    JPanel panel = new JPanel(new GridBagLayout());
    panel.setopaque( false );

    int row = 0;
    if( null != header ) {
        panel.add( header,row++,new Insets(0,0),0 ) );
    }

    panel.add( new JLabel(BundleSupport.getLabel("ErrCannotConnect")),// NOI18N
            new GridBagConstraints(0,GridBagConstraints.NONE,new Insets(5,5),0 ) );
    if( showProxyButton ) {
        JButton button = new JButton();
        Mnemonics.setLocalizedText( button,BundleSupport.getLabel( "ProxyConfig" ) );  // NOI18N
        button.setopaque( false );
        button.addActionListener( new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                HttpProxySettings.getDefault().showConfigurationDialog();
            }
        });
        panel.add( button,0 ) );
    }
    return panel;
}
项目:incubator-netbeans    文件StartPageContent.java   
public StartPageContent() {
    super( new GridBagLayout() );

    JComponent tabs = new TabbedPane( new LearnAnddiscoverTab(),new MyNetBeansTab(),new WhatsNewTab());
    tabs.setBorder(BorderFactory.createEmptyBorder(10,15));
    tabs.setopaque(false);

    add( tabs,GridBagConstraints.norTH,new Insets(27,0) );

    add( new JLabel(),2,0) );
}
项目:SuperMarketManageSystem    文件XiaoShouTuiHuoChaXun.java   
private void setupComponet(JComponent component,int gridx,int gridy,int gridwidth,int ipadx,boolean fill) {
    final GridBagConstraints gridBagConstrains = new GridBagConstraints();
    gridBagConstrains.gridx = gridx;
    gridBagConstrains.gridy = gridy;
    if (gridwidth > 1)
        gridBagConstrains.gridwidth = gridwidth;
    if (ipadx > 0)
        gridBagConstrains.ipadx = ipadx;
    gridBagConstrains.insets = new Insets(5,3,1);
    if (fill)
        gridBagConstrains.fill = GridBagConstraints.HORIZONTAL;
    getContentPane().add(component,gridBagConstrains);
}
项目:incubator-netbeans    文件SortPanel.java   
/**
 * Creates new form SortPanel
 */
public SortPanel() {
    listener = new Sortingchangelistener();
    initComponents();
    initCombos();
    pnlAttributes.add(new JLabel(),NUMBER_OF_COMBOS,GridBagConstraints.WEST,0));
}
项目:rapidminer    文件PerspectivesPanelBar.java   
private PerspectivesPanelBar(Perspectives perspectives) {
    setLayout(new GridBagLayout());
    setopaque(false);

    GridBagConstraints gbc = new GridBagConstraints();
    gbc.insets = new Insets(1,0);

    JToolBar workspacetoolBar = perspectives.getWorkspacetoolBar();
    workspacetoolBar.setBackground(getBackgroundColor());
    add(workspacetoolBar,gbc);
}
项目:Equella    文件WhereTargetChooser.java   
protected void createGUI()
{
    GridBagLayout gridbag = new GridBagLayout();
    GridBagConstraints c = new GridBagConstraints();

    setLayout(gridbag);
    setMaximumSize(new Dimension(Short.MAX_VALUE,Short.MAX_VALUE));

    target = new JTextField();
    target.setEditable(false);
    target.setMinimumSize(new Dimension(150,20));
    target.setPreferredSize(new Dimension(150,20));
    target.setMaximumSize(new Dimension(150,20));
    c.gridx = 0;
    c.weightx = 1;
    c.gridy = 0;
    c.fill = GridBagConstraints.HORIZONTAL;
    gridbag.setConstraints(target,c);
    add(target);

    search = new JButton("...");
    search.setFont(new Font("Sans Serif",Font.PLAIN,8));
    search.addActionListener(this);
    search.setMinimumSize(new Dimension(18,20));
    search.setPreferredSize(new Dimension(18,20));
    search.setMaximumSize(new Dimension(18,20));

    c.gridx = 1;
    c.weightx = 0;
    gridbag.setConstraints(search,c);
    add(search);
}
项目:s-store    文件AbstractViewer.java   
public static GridBagConstraints getConstraints() {
    GridBagConstraints c = new GridBagConstraints();
    c.gridwidth = 1;
    c.gridheight = 1;
    c.weightx = 0.5;
    c.ipadx = 150;
    c.ipady = 2;
    c.gridx = 0;
    c.gridy = 0;
    c.fill = GridBagConstraints.NONE;
    c.insets = insets;
    c.anchor = GridBagConstraints.LINE_START;
    return (c);
}

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。