Package javax.swing

Examples of javax.swing.JLabel


        new char[] { ':' }, -1);

    JPanel timePn = new JPanel(new GridLayout(2, 2));
    timePn.setBorder(BorderFactory.createTitledBorder(mLocalizer.msg(
        "TimeOfDay", "Uhrzeit")));
    timePn.add(new JLabel(mLocalizer.msg("from", "from")));
    timePn.add(mFromTimeSp);
    timePn.add(new JLabel(mLocalizer.msg("till", "till")));
    timePn.add(mToTimeSp);

    mIncludeBtn = new JCheckBox(mLocalizer.msg("includeRunning",
        "Include programs running at start time"));
    mIncludeBtn.setSelected(mShowRunning);
View Full Code Here


   
    Localizer localizer = MarkingsSettingsTab.mLocalizer;
   
    String[] colors = {localizer.msg("color.minPriority","1. Color (minimum priority)"),localizer.msg("color.lowerMediumPriority","2. Color (lower medium priority)"),localizer.msg("color.mediumPriority","3. Color (Medium priority)"),localizer.msg("color.higherMediumPriority","4. Color (higher medium priority)"),localizer.msg("color.maxPriority","5. Color (maximum priority)")};
   
    mPriorityText = new JLabel(mLocalizer.msg("importantMarkPriority","Mark priority higher or the same like:"));
   
    mPriority = new JComboBox(colors);
    mPriority.setSelectedIndex(Settings.propTrayImportantProgramsPriority.getInt());
    mPriority.setRenderer(new MarkPriorityComboBoxRenderer());
View Full Code Here

  }

  public JPanel createSettingsContent() {
    mContent = new JPanel(new TabLayout(3));

    mContent.add(new JLabel(mLocalizer.msg("timeOfDay.edge", "Edge")));
    mTimeOfDayEdgeTF = new JTextField(Settings.propTimeOfDayBackgroundEdge.getString(), 25);
    mContent.add(mTimeOfDayEdgeTF);
    mContent.add(ProgramTableSettingsTab.createBrowseButton(mContent, mTimeOfDayEdgeTF));

    mContent.add(new JLabel(mLocalizer.msg("timeOfDay.early", "Early")));
    mTimeOfDayEarlyTF = new JTextField(Settings.propTimeOfDayBackgroundEarly.getString(), 25);
    mContent.add(mTimeOfDayEarlyTF);
    mContent.add(ProgramTableSettingsTab.createBrowseButton(mContent, mTimeOfDayEarlyTF));

    mContent.add(new JLabel(mLocalizer.msg("timeOfDay.midday", "Midday")));
    mTimeOfDayMiddayTF = new JTextField(Settings.propTimeOfDayBackgroundMidday.getString(), 25);
    mContent.add(mTimeOfDayMiddayTF);
    mContent.add(ProgramTableSettingsTab.createBrowseButton(mContent, mTimeOfDayMiddayTF));

    mContent.add(new JLabel(mLocalizer.msg("timeOfDay.afternoon", "Afternoon")));
    mTimeOfDayAfternoonTF = new JTextField(Settings.propTimeOfDayBackgroundAfternoon.getString(), 25);
    mContent.add(mTimeOfDayAfternoonTF);
    mContent.add(ProgramTableSettingsTab.createBrowseButton(mContent, mTimeOfDayAfternoonTF));

    mContent.add(new JLabel(mLocalizer.msg("timeOfDay.evening", "Evening")));
    mTimeOfDayEveningTF = new JTextField(Settings.propTimeOfDayBackgroundEvening.getString(), 25);
    mContent.add(mTimeOfDayEveningTF);
    mContent.add(ProgramTableSettingsTab.createBrowseButton(mContent, mTimeOfDayEveningTF));

    return mContent;
View Full Code Here

  }

  public JPanel createSettingsContent() {
    mContent = new JPanel(new TabLayout(3));

    mContent.add(new JLabel(mLocalizer.msg("oneImage.image", "Image")));
    mOneImageBackgroundTF = new JTextField(Settings.propOneImageBackground.getString(), 25);
    mContent.add(mOneImageBackgroundTF);
    mContent.add(ProgramTableSettingsTab.createBrowseButton(mContent, mOneImageBackgroundTF));

View Full Code Here

    mContent = new JPanel(new TabLayout(1));

    JPanel p1 = new JPanel(new FlowLayout(FlowLayout.LEADING));
    mContent.add(p1);
    p1.add(new JLabel(mLocalizer.msg("timeBlock.blockSize", "Block size")));
    mTimeBlockSizeSp = new JSpinner(new SpinnerNumberModel(Settings.propTimeBlockSize.getInt(), 1, 23, 1));

    p1.add(mTimeBlockSizeSp);
    p1.add(new JLabel(mLocalizer.msg("timeBlock.hours", "hours")));

    p1 = new JPanel(new TabLayout(3));
    mContent.add(p1);

    p1.add(new JLabel(mLocalizer.msg("timeBlock.background1", "Image 1")));
    mTimeBlockBackground1TF = new JTextField(Settings.propTimeBlockBackground1.getString(), 25);
    p1.add(mTimeBlockBackground1TF);
    p1.add(ProgramTableSettingsTab.createBrowseButton(mContent, mTimeBlockBackground1TF));

    p1.add(new JLabel(mLocalizer.msg("timeBlock.background2", "Image 2")));
    mTimeBlockBackground2TF = new JTextField(Settings.propTimeBlockBackground2.getString(), 25);
    p1.add(mTimeBlockBackground2TF);
    p1.add(ProgramTableSettingsTab.createBrowseButton(mContent, mTimeBlockBackground2TF));

    mTimeBlockShowWestChB = new JCheckBox(mLocalizer.msg("timeBlock.showWest", "Show left border"), Settings.propTimeBlockShowWest.getBoolean());
    mTimeBlockShowWestChB.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        handleTimeBlockShowWest();
      }
    });
    mContent.add(mTimeBlockShowWestChB);

    mTimeBlockShowWestChB.setSelected(Settings.propTimeBlockShowWest.getBoolean());

    p1 = new JPanel(new TabLayout(3));
    mContent.add(p1);

    mTimeBlockWestImage1Lb = new JLabel(mLocalizer.msg("timeBlock.west1", "Border image 1"));
    p1.add(mTimeBlockWestImage1Lb);
    mTimeBlockWestImage1TF = new JTextField(Settings.propTimeBlockWestImage1.getString(), 25);
    p1.add(mTimeBlockWestImage1TF);
    mTimeBlockWestImage1Bt = ProgramTableSettingsTab.createBrowseButton(mContent, mTimeBlockWestImage1TF);
    p1.add(mTimeBlockWestImage1Bt);

    mTimeBlockWestImage2Lb = new JLabel(mLocalizer.msg("timeBlock.west2", "Border image 2"));
    p1.add(mTimeBlockWestImage2Lb);
    mTimeBlockWestImage2TF = new JTextField(Settings.propTimeBlockWestImage2.getString(), 25);
    p1.add(mTimeBlockWestImage2TF);
    mTimeBlockWestImage2Bt = ProgramTableSettingsTab.createBrowseButton(mContent, mTimeBlockWestImage2TF);
    p1.add(mTimeBlockWestImage2Bt);
View Full Code Here

    CellConstraints cc = new CellConstraints();

    panel.setBorder(Borders.DLU4_BORDER);

    // name
    panel.add(new JLabel(mLocalizer.msg("channelName", "Channel Name:")), cc.xy(1, 1));
    mChannelName = new JTextField(mChannel.getName());
    panel.add(mChannelName, cc.xy(3, 1));

    // provider
    panel.add(new JLabel(mLocalizer.msg("provider", "Provided by:")), cc.xy(1, 3));
    panel.add(new JLabel(ChannelUtil.getProviderName(mChannel)), cc.xy(3, 3));

    // logo
    panel.add(new JLabel(mLocalizer.msg("channelLogo", "Channel Logo:")), cc.xy(1, 5));
    if (mChannel.getUserIconFileName() != null) {
      mIconFile = new File(mChannel.getUserIconFileName());
    }
   
    mIconLabel = new JLabel(createUserIcon());
    mChangeIcon = new JButton(mLocalizer.msg("useIcon", "Select channel icon"));
    mChangeIcon.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        changeIcon();
      }
    });

    panel.add(mIconLabel, cc.xy(3, 5));
    panel.add(mChangeIcon, cc.xy(3, 7));

    // URL
    panel.add(new JLabel(mLocalizer.msg("webAddress", "Web Address:")), cc.xy(1, 9));
    mWebPage =new JTextField(mChannel.getWebpage());
    panel.add(mWebPage, cc.xy(3, 9));

    // time correction
    panel.add(new JLabel(mLocalizer.msg("time", "Time zone correction:")), cc.xy(1, 11));
    mCorrectionCB = new JComboBox(new String[] { "-1:00", "-0:45", "-0:30", "-0:15", "0:00", "+0:15", "+0:30", "+0:45", "+1:00" });
    mCorrectionCB.setSelectedIndex(mChannel.getTimeZoneCorrectionMinutes() / 15 + 4);
    panel.add(mCorrectionCB, cc.xy(3, 11));

    JTextArea txt = UiUtilities.createHelpTextArea(mLocalizer.msg("DLSTNote", ""));
View Full Code Here

  }

  @Override
  public JPanel getSettingsPanel() {
    JPanel p1 = new JPanel();
    p1.add(new JLabel(mLocalizer.msg("desc",
        "Accepts only the first occurrence of several programs with similar titles.")));
    return p1;
  }
View Full Code Here

    mShowSettingsSeparator = showSettingsSeparator;
    setLayout(new FormLayout("5dlu,pref,10dlu,default:grow,5dlu",
        "pref,5dlu,top:pref,top:pref,top:pref,top:pref,10dlu,pref"));
    CellConstraints cc = new CellConstraints();

    add(new JLabel(mLocalizer.msg("name", "Name")), cc.xy(2, mYCount));
    add(mNameLabel = new JLabel("-"), cc.xy(4, mYCount++));

    add(new JLabel(mLocalizer.msg("version", "Version")), cc
        .xy(2, mYCount));
    add(mVersionLabel = new JLabel("-"), cc.xy(4, mYCount++));

    add(new JLabel(mLocalizer.msg("author", "Author")), cc.xy(2, mYCount));
    add(mAuthorLabel = new JLabel("-"), cc.xy(4, mYCount++));

    add(new JLabel(mLocalizer.msg("description", "Description")), cc.xy(2,
        mYCount));
    add(mDescriptionLabel = new JLabel(), cc.xy(4, mYCount++));

    if (info != null) {
      setPluginInfo(info);
    }
  }
View Full Code Here

    public ContextMenuCellRenderer() {
      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

    @Override
    public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected,
        boolean cellHasFocus) {

      JLabel label = (JLabel) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);

      if (value instanceof SeparatorMenuItem) {
        LineComponent comp = new LineComponent(label.getForeground());
        comp.setBackground(label.getBackground());
        comp.setOpaque(isSelected);
        comp.setPreferredSize(label.getPreferredSize());
        return comp;
      } else if (value instanceof ConfigMenuItem) {
        mItemSelected.setSelected(!mDeactivatedItems.contains(value));

        mItemLabel.setIcon(TVBrowserIcons.preferences(TVBrowserIcons.SIZE_SMALL));
        mItemLabel.setText(value.toString());
        mItemLabel.setForeground(label.getForeground());

        mItemPanel.setBackground(label.getBackground());
        mItemPanel.setOpaque(isSelected);

        return mItemPanel;
      } else if (value instanceof LeaveFullScreenMenuItem) {
        mItemSelected.setSelected(!mDeactivatedItems.contains(value));

        mItemLabel.setIcon(TVBrowserIcons.fullScreen(TVBrowserIcons.SIZE_SMALL));
        mItemLabel.setText(value.toString());
        mItemLabel.setForeground(label.getForeground());

        mItemPanel.setBackground(label.getBackground());
        mItemPanel.setOpaque(isSelected);

        return mItemPanel;
      } else if (value instanceof ContextMenuIf) {
        ContextMenuIf menuIf = (ContextMenuIf) value;
        Program exampleProgram = Plugin.getPluginManager().getExampleProgram();

        // Get the context menu item text
        StringBuilder text = new StringBuilder();
        Icon icon = null;
        // Action[] actionArr = plugin.getContextMenuActions(exampleProgram);
        ActionMenu actionMenu = menuIf.getContextMenuActions(exampleProgram);
        if (actionMenu != null) {
          Action action = actionMenu.getAction();
          if (action != null) {
            text.append((String) action.getValue(Action.NAME));
            icon = (Icon) action.getValue(Action.SMALL_ICON);
            if (icon != null) {
              icon = new FixedSizeIcon(16, 16, icon);
            }
          } else if (menuIf instanceof PluginProxy) {
            text.append(((PluginProxy) menuIf).getInfo().getName());
            icon = ((PluginProxy) menuIf).getMarkIcon();
          } else {
            text.append("unknown");
            icon = null;
          }
        }

        mItemLabel.setIcon(icon);
        mItemLabel.setText(text.toString());
        mItemLabel.setForeground(label.getForeground());

        mItemSelected.setSelected(!mDeactivatedItems.contains(value));

        mItemPanel.setBackground(label.getBackground());
        mItemPanel.setOpaque(isSelected);
        return mItemPanel;
      }

      return label;
View Full Code Here

TOP

Related Classes of javax.swing.JLabel

Copyright © 2018 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.