Examples of EditorThemeProperties


Examples of net.sf.robocode.ui.editor.theme.EditorThemeProperties

      fontNameComboBox.setRenderer(new FontCellRenderer());

      fontNameComboBox.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
          EditorThemeProperties themeProps = EditorThemePropertiesManager.getCurrentEditorThemeProperties();

          String oldFontName = themeProps.getFontName();
          String newFontName = ComboBoxUtil.getSelectedName(fontNameComboBox);
          if (!newFontName.equals(oldFontName)) {
            String oldThemeName = themeProps.getThemeName();
            String newThemeName = ComboBoxUtil.getSelectedName(getThemeComboBox());
            if (newThemeName.equals(oldThemeName)) {
              themeProps.setFontName(newFontName);
              updateSaveButton();
            }
          }
        }
      });
View Full Code Here

Examples of net.sf.robocode.ui.editor.theme.EditorThemeProperties

      fontStyleComboBox.addActionListener(
          new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
          EditorThemeProperties themeProps = EditorThemePropertiesManager.getCurrentEditorThemeProperties();

          FontStyle oldFontStyle = themeProps.getNormalTextStyle();
          FontStyle newFontStyle = ComboBoxUtil.getSelectedStyle(getFontStyleComboBox());
          if (newFontStyle != oldFontStyle) {
            themeProps.setNormalTextStyle(newFontStyle);

            ComboBoxUtil.setSelected(getNormalTextColorAndStyle().getFontStyleComboBox(),
                (String) getFontStyleComboBox().getSelectedItem());

            updateSaveButton();
View Full Code Here

Examples of net.sf.robocode.ui.editor.theme.EditorThemeProperties

      fontSizeComboBox.setSelectedIndex(5);

      fontSizeComboBox.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
          EditorThemeProperties themeProps = EditorThemePropertiesManager.getCurrentEditorThemeProperties();

          int oldFontSize = themeProps.getFontSize();
          int newFontSize = Integer.parseInt((String) getFontSizeComboBox().getSelectedItem());
          if (newFontSize != oldFontSize) {
            themeProps.setFontSize(newFontSize);
            updateSaveButton();
          }
        }
      });
    }
View Full Code Here

Examples of net.sf.robocode.ui.editor.theme.EditorThemeProperties

    return panel;
  }

  private ColorAndStyle getBackgroundColorAndStyle() {
    if (backgroundColorAndStyle == null) {
      EditorThemeProperties props = EditorThemePropertiesManager.getCurrentEditorThemeProperties();
      backgroundColorAndStyle = new ColorAndStyle("Background Color", props.getBackgroundColor(), null);
      backgroundColorAndStyle.addListener(new ColorAndStyleAdapter() {
        @Override
        public void colorChanged(Color newColor) {
          EditorThemeProperties themeProps = EditorThemePropertiesManager.getCurrentEditorThemeProperties();
          themeProps.setBackgroundColor(newColor);

          updateSaveButton();
        }
      });
    }
View Full Code Here

Examples of net.sf.robocode.ui.editor.theme.EditorThemeProperties

    return backgroundColorAndStyle;
  }

  private ColorAndStyle getLineNumberBackgroundColorAndStyle() {
    if (lineNumberBackgroundColorAndStyle == null) {
      EditorThemeProperties props = EditorThemePropertiesManager.getCurrentEditorThemeProperties();
      lineNumberBackgroundColorAndStyle = new ColorAndStyle("Line Number Background Color",
          props.getLineNumberBackgroundColor(), null);
      lineNumberBackgroundColorAndStyle.addListener(new ColorAndStyleAdapter() {
        @Override
        public void colorChanged(Color newColor) {
          EditorThemeProperties themeProps = EditorThemePropertiesManager.getCurrentEditorThemeProperties();
          themeProps.setLineNumberBackgroundColor(newColor);

          updateSaveButton();
        }
      });
    }
View Full Code Here

Examples of net.sf.robocode.ui.editor.theme.EditorThemeProperties

    return lineNumberBackgroundColorAndStyle;
  }

  private ColorAndStyle getLineNumberTextColorAndStyle() {
    if (lineNumberTextColorAndStyle == null) {
      EditorThemeProperties props = EditorThemePropertiesManager.getCurrentEditorThemeProperties();
      lineNumberTextColorAndStyle = new ColorAndStyle("Line Number Text Color", props.getLineNumberTextColor(),
          null);
      lineNumberTextColorAndStyle.addListener(new ColorAndStyleAdapter() {
        @Override
        public void colorChanged(Color newColor) {
          EditorThemeProperties themeProps = EditorThemePropertiesManager.getCurrentEditorThemeProperties();
          themeProps.setLineNumberTextColor(newColor);

          updateSaveButton();
        }
      });
    }
View Full Code Here

Examples of net.sf.robocode.ui.editor.theme.EditorThemeProperties

    return lineNumberTextColorAndStyle;
  }

  private ColorAndStyle getHighlightedLineColorAndStyle() {
    if (highlightedLineColorAndStyle == null) {
      EditorThemeProperties props = EditorThemePropertiesManager.getCurrentEditorThemeProperties();
      highlightedLineColorAndStyle = new ColorAndStyle("Highlighted Line Color", props.getHighlightedLineColor(),
          null);
      highlightedLineColorAndStyle.addListener(new ColorAndStyleAdapter() {
        @Override
        public void colorChanged(Color newColor) {
          EditorThemeProperties themeProps = EditorThemePropertiesManager.getCurrentEditorThemeProperties();
          themeProps.setHighlightedLineColor(newColor);
         
          updateSaveButton();
        }
      });
    }
View Full Code Here

Examples of net.sf.robocode.ui.editor.theme.EditorThemeProperties

    return highlightedLineColorAndStyle;
  }

  private ColorAndStyle getSelectionColorAndStyle() {
    if (selectionColorAndStyle == null) {
      EditorThemeProperties props = EditorThemePropertiesManager.getCurrentEditorThemeProperties();
      selectionColorAndStyle = new ColorAndStyle("Selection Color", props.getSelectionColor(), null);
      selectionColorAndStyle.addListener(new ColorAndStyleAdapter() {
        @Override
        public void colorChanged(Color newColor) {
          EditorThemeProperties themeProps = EditorThemePropertiesManager.getCurrentEditorThemeProperties();
          themeProps.setSelectionColor(newColor);

          updateSaveButton();
        }
      });
    }
View Full Code Here

Examples of net.sf.robocode.ui.editor.theme.EditorThemeProperties

    return selectionColorAndStyle;
  }

  private ColorAndStyle getSelectedTextColorAndStyle() {
    if (selectedTextColorAndStyle == null) {
      EditorThemeProperties props = EditorThemePropertiesManager.getCurrentEditorThemeProperties();
      selectedTextColorAndStyle = new ColorAndStyle("Selected Text Color", props.getSelectedTextColor(), null);
      selectedTextColorAndStyle.addListener(new ColorAndStyleAdapter() {
        @Override
        public void colorChanged(Color newColor) {
          EditorThemeProperties themeProps = EditorThemePropertiesManager.getCurrentEditorThemeProperties();
          themeProps.setSelectedTextColor(newColor);
        }
      });
    }
    return selectedTextColorAndStyle;
  }
View Full Code Here

Examples of net.sf.robocode.ui.editor.theme.EditorThemeProperties

    return selectedTextColorAndStyle;
  }

  private ColorAndStyle getNormalTextColorAndStyle() {
    if (normalTextColorAndStyle == null) {
      EditorThemeProperties props = EditorThemePropertiesManager.getCurrentEditorThemeProperties();
      normalTextColorAndStyle = new ColorAndStyle("Normal Text Color", props.getNormalTextColor(),
          props.getNormalTextStyle());
      normalTextColorAndStyle.addListener(new ColorAndStyleAdapter() {
        @Override
        public void colorChanged(Color newColor) {
          EditorThemeProperties themeProps = EditorThemePropertiesManager.getCurrentEditorThemeProperties();
          themeProps.setNormalTextColor(newColor);

          updateSaveButton();
        }

        @Override
        public void styleChanged(FontStyle newStyle) {
          EditorThemeProperties themeProps = EditorThemePropertiesManager.getCurrentEditorThemeProperties();
          themeProps.setNormalTextStyle(newStyle);

          updateSaveButton();

          // Make sure to update the font style combo box
          ComboBoxUtil.setSelected(getFontStyleComboBox(), newStyle);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.