private void applyFontStyle(ArrayList<GeoElement> geos) { int fontStyle = 0; if (btnBold.isSelected()) fontStyle += 1; if (btnItalic.isSelected()) fontStyle += 2; for (int i = 0; i < geos.size(); i++) { GeoElement geo = geos.get(i); Log.debug(((GeoCasCell) geo).getGeoText()); if (geo instanceof GeoCasCell && ((GeoCasCell) geo).getGeoText().getFontStyle() != fontStyle) { ((GeoCasCell) geo).getGeoText().setFontStyle(fontStyle); geo.updateRepaint(); needUndo = true; } } }
private void applyUseAsText(ArrayList<GeoElement> geos) { // btnUseAsText for (int i = 0; i < geos.size(); i++) { GeoElement geo = geos.get(i); if (geo instanceof GeoCasCell) { ((GeoCasCell) geo).setUseAsText(btnUseAsText.isSelected()); geo.updateRepaint(); needUndo = true; } } }