Examples of EditorThemeProperties


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

    return normalTextColorAndStyle;
  }

  private ColorAndStyle getQuotedTextColorAndStyle() {
    if (quotedTextColorAndStyle == null) {
      EditorThemeProperties props = EditorThemePropertiesManager.getCurrentEditorThemeProperties();
      quotedTextColorAndStyle = new ColorAndStyle("Quoted Text Color", props.getQuotedTextColor(),
          props.getQuotedTextStyle());
      quotedTextColorAndStyle.addListener(new ColorAndStyleAdapter() {
        @Override
        public void colorChanged(Color newColor) {
          EditorThemeProperties themeProps = EditorThemePropertiesManager.getCurrentEditorThemeProperties();
          themeProps.setQuotedTextColor(newColor);

          updateSaveButton();
        }

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

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

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

    return quotedTextColorAndStyle;
  }

  private ColorAndStyle getKeywordTextColorAndStyle() {
    if (keywordTextColorAndStyle == null) {
      EditorThemeProperties props = EditorThemePropertiesManager.getCurrentEditorThemeProperties();
      keywordTextColorAndStyle = new ColorAndStyle("Keyword Color", props.getKeywordTextColor(),
          props.getKeywordTextStyle());
      keywordTextColorAndStyle.addListener(new ColorAndStyleAdapter() {
        @Override
        public void colorChanged(Color newColor) {
          EditorThemeProperties themeProps = EditorThemePropertiesManager.getCurrentEditorThemeProperties();
          themeProps.setKeywordTextColor(newColor);

          updateSaveButton();
        }

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

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

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

      }
    });

    scrollPane.setViewportView(editorPane);

    EditorThemeProperties themeProps = EditorThemePropertiesManager.getCurrentEditorThemeProperties();
    setBackgroundColor(themeProps.getBackgroundColor());
    setSelectionColor(themeProps.getSelectionColor());
    setSelectedTextColor(themeProps.getSelectedTextColor());

    lineNumberArea = new LineNumberArea(editorPane);
    scrollPane.setRowHeaderView(lineNumberArea);

    add(scrollPane, BorderLayout.CENTER);
View Full Code Here

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

    super("1");

    setEditable(false);
    setLineWrap(false);

    EditorThemeProperties themeProps = EditorThemePropertiesManager.getCurrentEditorThemeProperties();
    setBackgroundColor(themeProps.getLineNumberBackgroundColor());
    setTextColor(themeProps.getLineNumberTextColor());
   
    textComponent.getDocument().addDocumentListener(documentListener);

    EditorThemePropertiesManager.addListener(new EditorThemePropertyChangeAdapter() {
      @Override
View Full Code Here

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

    return keywordTextColorAndStyle;
  }

  private ColorAndStyle getLiteralTextColorAndStyle() {
    if (literalTextColorAndStyle == null) {
      EditorThemeProperties props = EditorThemePropertiesManager.getCurrentEditorThemeProperties();
      literalTextColorAndStyle = new ColorAndStyle("Literal Color", props.getLiteralTextColor(),
          props.getLiteralTextStyle());
      literalTextColorAndStyle.addListener(new ColorAndStyleAdapter() {
        @Override
        public void colorChanged(Color newColor) {
          EditorThemeProperties themeProps = EditorThemePropertiesManager.getCurrentEditorThemeProperties();
          themeProps.setLiteralTextColor(newColor);

          updateSaveButton();
        }

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

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

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

    return literalTextColorAndStyle;
  }

  private ColorAndStyle getAnnotationTextColorAndStyle() {
    if (annotationTextColorAndStyle == null) {
      EditorThemeProperties props = EditorThemePropertiesManager.getCurrentEditorThemeProperties();
      annotationTextColorAndStyle = new ColorAndStyle("Annotation Color", props.getAnnotationTextColor(),
          props.getAnnotationTextStyle());
      annotationTextColorAndStyle.addListener(new ColorAndStyleAdapter() {
        @Override
        public void colorChanged(Color newColor) {
          EditorThemeProperties themeProps = EditorThemePropertiesManager.getCurrentEditorThemeProperties();
          themeProps.setAnnotationTextColor(newColor);

          updateSaveButton();
        }

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

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

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

    return annotationTextColorAndStyle;
  }

  private ColorAndStyle getCommentTextColorAndStyle() {
    if (commentTextColorAndStyle == null) {
      EditorThemeProperties props = EditorThemePropertiesManager.getCurrentEditorThemeProperties();
      commentTextColorAndStyle = new ColorAndStyle("Comment Color", props.getCommentTextColor(),
          props.getCommentTextStyle());
      commentTextColorAndStyle.addListener(new ColorAndStyleAdapter() {
        @Override
        public void colorChanged(Color newColor) {
          EditorThemeProperties themeProps = EditorThemePropertiesManager.getCurrentEditorThemeProperties();
          themeProps.setCommentTextColor(newColor);

          updateSaveButton();
        }

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

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

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

        // Load theme properties
        File filepath = EditorThemePropertiesManager.getFilepath(themeName);
        EditorThemePropertiesManager.loadEditorThemeProperties(filepath);

        EditorThemeProperties themeProps = EditorThemePropertiesManager.getCurrentEditorThemeProperties();

        ComboBoxUtil.setSelected(getFontNameComboBox(), themeProps.getFontName());
        ComboBoxUtil.setSelected(getFontSizeComboBox(), "" + themeProps.getFontSize());

        getBackgroundColorAndStyle().setSelectedColor(themeProps.getBackgroundColor());

        getLineNumberBackgroundColorAndStyle().setSelectedColor(themeProps.getLineNumberBackgroundColor());
        getLineNumberTextColorAndStyle().setSelectedColor(themeProps.getLineNumberTextColor());

        getHighlightedLineColorAndStyle().setSelectedColor(themeProps.getHighlightedLineColor());

        getSelectionColorAndStyle().setSelectedColor(themeProps.getSelectionColor());
        getSelectedTextColorAndStyle().setSelectedColor(themeProps.getSelectedTextColor());

        getNormalTextColorAndStyle().setSelectedColor(themeProps.getNormalTextColor());
        getNormalTextColorAndStyle().setSelectedStyle(themeProps.getNormalTextStyle());

        getCommentTextColorAndStyle().setSelectedColor(themeProps.getCommentTextColor());
        getCommentTextColorAndStyle().setSelectedStyle(themeProps.getCommentTextStyle());

        getQuotedTextColorAndStyle().setSelectedColor(themeProps.getQuotedTextColor());
        getQuotedTextColorAndStyle().setSelectedStyle(themeProps.getQuotedTextStyle());

        getKeywordTextColorAndStyle().setSelectedColor(themeProps.getKeywordTextColor());
        getKeywordTextColorAndStyle().setSelectedStyle(themeProps.getKeywordTextStyle());

        getLiteralTextColorAndStyle().setSelectedColor(themeProps.getLiteralTextColor());
        getLiteralTextColorAndStyle().setSelectedStyle(themeProps.getLiteralTextStyle());

        getAnnotationTextColorAndStyle().setSelectedColor(themeProps.getAnnotationTextColor());
        getAnnotationTextColorAndStyle().setSelectedStyle(themeProps.getAnnotationTextStyle());

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

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

      }
    });
  }

  private void updateSaveButton() {
    EditorThemeProperties props = EditorThemePropertiesManager.getCurrentEditorThemeProperties();
    boolean enabled = props.isChanged();
    getSaveButton().setEnabled(enabled);
  }
View Full Code Here

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

    boolean enabled = props.isChanged();
    getSaveButton().setEnabled(enabled);
  }
 
  private void performThemeComboBoxAction() {
    EditorThemeProperties currentThemeProps = EditorThemePropertiesManager.getCurrentEditorThemeProperties();

    String oldThemeName = currentThemeProps.getThemeName();
    String newThemeName = (String) getThemeComboBox().getSelectedItem();
    if (!oldThemeName.equals(newThemeName)) {
      if (currentThemeProps.isChanged()) {
        Object[] options = { "Yes, save changes", "No, forget changes", "Cancel"};

        int option = JOptionPane.showOptionDialog(null,
            "Changes have been made to the theme:\n" + oldThemeName
            + "\nDo you want save the changes to this theme?",
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.