Package java.awt

Examples of java.awt.BorderLayout


    final int ageLimit = program.getIntField(ProgramFieldType.AGE_LIMIT_TYPE);
    return ageLimit > 0 && ageLimit <= mRequiredAge;
  }

  public JPanel getSettingsPanel() {
    JPanel content = new JPanel(new BorderLayout());

    mAgeSpinner = new JSpinner(new SpinnerNumberModel(16, 6, 21, 1));
    mAgeSpinner.setValue(mRequiredAge);
    content.add(UiUtilities.createHelpTextArea(mLocalizer
        .msg("description", "")), BorderLayout.NORTH);
    content.add(mAgeSpinner, BorderLayout.SOUTH);

    JPanel centerPanel = new JPanel(new BorderLayout());
    centerPanel.add(content, BorderLayout.NORTH);
    return centerPanel;
  }
View Full Code Here


    if (bitSet(mSelectedBits, NOTYETSTARTED)) {
      mCheckBox[2].setSelected(true);
    }

    JPanel centerPanel = new JPanel(new BorderLayout());
    centerPanel.add(panel, BorderLayout.NORTH);
    return centerPanel;
  }
View Full Code Here

      mScript = null;
    }
  }

  public JPanel getSettingsPanel() {
    JPanel content = new JPanel(new BorderLayout());

    mScriptEditor = new BeanShellEditor();
    mScriptEditor.setText(mScriptSource);

    JScrollPane scrollPane = new JScrollPane(mScriptEditor);
View Full Code Here

      mItemSelected = new JCheckBox();
      mItemSelected.setOpaque(false);
      mSelectionWidth = mItemSelected.getPreferredSize().width;

      mItemLabel = new JLabel();
      mItemPanel = new JPanel(new BorderLayout());
      mItemPanel.add(mItemSelected, BorderLayout.WEST);
      mItemPanel.add(mItemLabel, BorderLayout.CENTER);
    }
View Full Code Here

    panel.add(mMinSpinner, a);

    panel.add(mMaxCheck, b);
    panel.add(mMaxSpinner, a);

    final JPanel centerPanel = new JPanel(new BorderLayout());
    centerPanel.add(panel, BorderLayout.NORTH);
    return centerPanel;
  }
View Full Code Here

      moreToolbar.setRollover(true);
      moreToolbar.setFloatable(false);
      moreToolbar.add(new MoreButton(toolbar,mainFrame));
      addMouseAdapter(moreToolbar);

        JPanel panel = new JPanel(new BorderLayout(0,0));

        panel.add(toolbar, BorderLayout.CENTER);

        if (toolbar.getToolbarLocation().compareTo(BorderLayout.NORTH) == 0) {
          moreToolbar.setBorder(BorderFactory.createEmptyBorder(0,0,0,5));
View Full Code Here

      bit <<= 1;
    }
  }

  public JPanel getSettingsPanel() {
    final JPanel content = new JPanel(new BorderLayout());
    content.add(new JLabel(mLocalizer.msg("description",
        "This filter accepts programs belonging to the following channels:")),
        BorderLayout.NORTH);

    ArrayList<String> selectedDays = new ArrayList<String>();
View Full Code Here

   *
   * @return the SettingsPanel
   */
  public JPanel createSettingsPanel() {
    mChannelListModel = new ChannelListModel();
    JPanel panel = new JPanel(new BorderLayout());

    JPanel northPn = new JPanel(new GridLayout(1, 2));
    JPanel centerPn = new JPanel(new GridLayout(1, 2));
    JPanel southPn = new JPanel(new BorderLayout());
    southPn.setBorder(BorderFactory.createEmptyBorder(5, 0, 5, 0));

    panel.add(northPn, BorderLayout.NORTH);
    panel.add(centerPn, BorderLayout.CENTER);
    panel.add(southPn, BorderLayout.SOUTH);

    mAvailableSeparator = DefaultComponentFactory.getInstance()
        .createSeparator(
            mLocalizer.msg("availableChannels", "Available channels") + ":");
    mAvailableSeparator.setBorder(BorderFactory.createEmptyBorder(5, 0, 5, 5));

    mSubscribedSeparator = DefaultComponentFactory.getInstance()
        .createSeparator(
            mLocalizer.msg("subscribedChannels", "Subscribed channels") + ":");
    mSubscribedSeparator.setBorder(BorderFactory.createEmptyBorder(5, 0, 5, 5));

    northPn.add(mAvailableSeparator, BorderLayout.NORTH);
    northPn.add(mSubscribedSeparator, BorderLayout.NORTH);

    // left list box
    JPanel listBoxPnLeft = new JPanel(new BorderLayout());
    mAllChannels = new ChannelJList(new DefaultListModel());
    mAllChannels.setCellRenderer(new ChannelListCellRenderer(true, true, true, true));

    listBoxPnLeft.add(new JScrollPane(mAllChannels), BorderLayout.CENTER);
/*
    mAllChannels.addListSelectionListener(new ListSelectionListener() {
      public void valueChanged(ListSelectionEvent e) {
        if ((mAllChannels.getModel().getSize() == 1)
            && (mAllChannels.getSelectedIndex() >= 0)
            && (mAllChannels.getSelectedValue() instanceof String)) {
          mAllChannels.setSelectedIndices(new int[] {});
        }
      }
    });
*/
    centerPn.add(listBoxPnLeft);

    mRightButton = new JButton(TVBrowserIcons.right(TVBrowserIcons.SIZE_LARGE));

    mRightButton.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        moveChannelsToRight();
      }
    });

    mLeftButton = new JButton(TVBrowserIcons.left(TVBrowserIcons.SIZE_LARGE));

    mLeftButton.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        moveChannelsToLeft();
      }
    });

    JPanel btnPanel = createButtonPn(mRightButton, mLeftButton);
    btnPanel.setBorder(BorderFactory.createEmptyBorder(0, Sizes
        .dialogUnitXAsPixel(3, btnPanel), 0, Sizes.dialogUnitXAsPixel(3,
        btnPanel)));
    listBoxPnLeft.add(btnPanel, BorderLayout.EAST);

    // right list box
    JPanel listBoxPnRight = new JPanel(new BorderLayout());
    SortableItemList channelList = new SortableItemList(new ChannelJList());

    mSubscribedChannels = channelList.getList();
    mFilter = new ChannelFilter();
    mSubscribedChannels.setCellRenderer(new FilteredChannelListCellRenderer(mFilter));

    // Register DnD on the lists.
    mDnDHandler = new ListDragAndDropHandler(mAllChannels, mSubscribedChannels, this);
    mDnDHandler.setPaintCueLine(false, true);

    // Register the listener for DnD on the lists.
    new DragAndDropMouseListener(mAllChannels, mSubscribedChannels, this,
        mDnDHandler);
    mSubscribedChannelListener = new DragAndDropMouseListener(
        mSubscribedChannels, mAllChannels, this, mDnDHandler);

    restoreForPopup();

    listBoxPnRight.add(new JScrollPane(mSubscribedChannels),
        BorderLayout.CENTER);

    final JButton configureChannels = new JButton(mLocalizer.msg(
        "configSelectedChannels", "Configure selected channels"));
    configureChannels.setEnabled(false);

    configureChannels.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        configChannels();
      }
    });

    mSubscribedChannels.addListSelectionListener(new ListSelectionListener() {
      public void valueChanged(ListSelectionEvent e) {
        if (mSubscribedChannels.getSelectedValues().length > 0) {
          configureChannels.setEnabled(true);
        } else {
          configureChannels.setEnabled(false);
        }
      }
    });

    // use INSERT key on left side to move selected channels to active channel
    // list
    mAllChannels.addKeyListener(new KeyAdapter() {
      public void keyPressed(KeyEvent e) {
        if (e.getKeyCode() == KeyEvent.VK_INSERT) {
          moveChannelsToRight();
        }
      }
    });

    // use DELETE key on right side to remove selected channels
    mSubscribedChannels.addKeyListener(new KeyAdapter() {
      public void keyPressed(KeyEvent e) {
        if (e.getKeyCode() == KeyEvent.VK_DELETE) {
          moveChannelsToLeft();
        }
      }
    });

    JPanel btnPanel2 = createButtonPn(channelList.getTopButton(), channelList
        .getUpButton(), channelList.getDownButton(), channelList
        .getBottomButton());
    btnPanel2.setBorder(BorderFactory.createEmptyBorder(0, Sizes
        .dialogUnitXAsPixel(3, btnPanel2), 0, 0));
    listBoxPnRight.add(btnPanel2, BorderLayout.EAST);

    centerPn.add(listBoxPnRight);

    final JPanel result = new JPanel(new BorderLayout());
    result.addComponentListener(new ComponentAdapter() {

      @Override
      public void componentHidden(ComponentEvent e) {
        if (e.getComponent() == result) {
          mRefreshListTimer = null;
        }
      }

    });

    result.add(createFilterPanel(), BorderLayout.NORTH);

    result.add(panel, BorderLayout.CENTER);

    LinkButton urlLabel = new LinkButton(
        mLocalizer
            .msg(
                "addMoreChannels",
                "You want to add your own channels? Click here!"),
        mLocalizer.msg("addMoreChannelsUrl",
            "http://enwiki.tvbrowser.org/index.php/Available_stations"));

    JPanel buttonsPanel = new JPanel(new BorderLayout());

    // buttonsPanel.add(pn2, BorderLayout.EAST);
    buttonsPanel.add(urlLabel, BorderLayout.SOUTH);

    result.add(buttonsPanel, BorderLayout.SOUTH);
View Full Code Here

    filterPanel.add(new JLabel(mLocalizer.msg("category", "Category") + ":"),
        cc.xy(6, 1));
    filterPanel.add(mCategoryCB, cc.xyw(8, 1, 2));

    JPanel namePanel = new JPanel(new BorderLayout());

    namePanel.add(new JLabel(mLocalizer.msg("filterText",
        "With the following Text")
        + ": "), BorderLayout.WEST);
View Full Code Here

    mToSpinner.setValue(mEndDays);
    content.add(mToSpinner, cc.xy(3, currentRow));
    content.add(new JLabel(mLocalizer.msg("to.2", "days")), cc
        .xy(5, currentRow));

    JPanel centerPanel = new JPanel(new BorderLayout());
    centerPanel.add(content, BorderLayout.NORTH);
    return centerPanel;
  }
View Full Code Here

TOP

Related Classes of java.awt.BorderLayout

Copyright © 2015 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.