/** * @param source event source * @param targetGeos cells that need updating */ protected void processSource(Object source, ArrayList<GeoElement> targetGeos) { if (source == btnTextColor) { if (btnTextColor.getSelectedIndex() >= 0) { applyTextColor(targetGeos); // btnTextColor.setFgColor((Color)btnTextColor.getSelectedValue()); // btnItalic.setForeground((Color)btnTextColor.getSelectedValue()); // btnBold.setForeground((Color)btnTextColor.getSelectedValue()); } } else if (source == btnBold) { applyFontStyle(targetGeos); } else if (source == btnItalic) { applyFontStyle(targetGeos); } else if (source == btnTextSize) { applyTextSize(targetGeos); } else if (source == btnUseAsText) { int i = casView.getConsoleTable().getEditingRow(); int pos = ((CASTableCellEditorD) casView.getConsoleTable().getCellEditor(i, CASTable.COL_CAS_CELLS)) .getCaretPosition(); applyUseAsText(targetGeos); casView.getConsoleTable().startEditingRow(i); ((CASTableCellEditorD) casView.getConsoleTable().getCellEditor(i, CASTable.COL_CAS_CELLS)) .setCaretPosition(pos); } else if (source == btnShowKeyboard) { if (((GuiManagerD) app.getGuiManager()) != null) { if (AppD.isVirtualKeyboardActive() && !((GuiManagerD) app.getGuiManager()).showVirtualKeyboard()) { // if keyboard is active but hidden, just show it ((GuiManagerD) app.getGuiManager()).toggleKeyboard(true); ((GuiManagerD) app.getGuiManager()).getVirtualKeyboard().toggleNumeric(true); } else { AppD.setVirtualKeyboardActive(!AppD.isVirtualKeyboardActive()); ((GuiManagerD) app.getGuiManager()).toggleKeyboard(AppD.isVirtualKeyboardActive()); ((GuiManagerD) app.getGuiManager()) .getVirtualKeyboard() .toggleNumeric(AppD.isVirtualKeyboardActive()); } } } updateStyleBar(); }