private void setForegroundColors() {
   shellPreview.setForeground(themeData.getColor(ThemeData.SHELL_FOREGROUND_COLOR));
   shellPreview.setSelectedTextColor(
       themeData.getColor(ThemeData.SHELL_SELECTED_FOREGROUND_COLOR));
   shellPreview.setCaretColor(themeData.getColor(ThemeData.SHELL_FOREGROUND_COLOR));
   historyPreview.setForeground(themeData.getColor(ThemeData.SHELL_HISTORY_FOREGROUND_COLOR));
   historyPreview.setSelectionForeground(
       themeData.getColor(ThemeData.SHELL_HISTORY_SELECTED_FOREGROUND_COLOR));
 }
Beispiel #2
0
  public StackPanel(Controller controller) {
    _controller = controller;
    _taStack = new JTextArea("");
    _panelEditorPila = new JPanel();
    _btnPush = new JButton("Push");
    _btnPop = new JButton("Pop");
    _taValue = new JTextArea();
    _lblValor = new JLabel("Valor:");
    _scrollPane = new JScrollPane(_taStack);

    //// Definicion del panel de la pila. Contiene la representacion de la pila(text) y el editor de
    // pila.
    setBorder(javax.swing.BorderFactory.createTitledBorder("Pila de operandos"));
    setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
    setBackground(Color.gray); // Cambia el color del panel

    _taStack.setEditable(false);
    _taStack.setBackground(Color.black);
    _taStack.setForeground(Color.cyan);
    _taStack.setCaretColor(Color.green);
    _panelEditorPila.setBackground(Color.gray); // Cambia el color del panel
    _panelEditorPila.add(_lblValor);
    _panelEditorPila.add(_taValue);
    _panelEditorPila.add(_btnPush);
    _btnPush.addActionListener(this);
    _panelEditorPila.add(_btnPop);
    _btnPop.addActionListener(this);
    _taValue.setColumns(10);
    _taValue.setBackground(Color.black);
    _taValue.setForeground(Color.cyan);
    _taValue.setCaretColor(Color.green);
    _scrollPane.setMaximumSize(new Dimension(150, 250));
    _scrollPane.setPreferredSize(new Dimension(150, 250));
    add(_scrollPane); // Add
    add(_panelEditorPila); // Add

    _controller.addStackObserver(this);

    // refresh();
  }
 Hour11TextPanel(String title, boolean editable) {
   super(new BorderLayout());
   if (title != null) {
     Border border = BorderFactory.createTitledBorder(title);
     setBorder(border);
   }
   m_textArea.setBackground(textBackgroundColor);
   m_textArea.setForeground(textForegroundColor);
   m_textArea.setFont(textComponentFont);
   m_textArea.setCaretColor(textCaretColor);
   m_textArea.setEditable(editable);
   add(m_scrollPane);
 }