Search in sources :

Example 6 with ColorAttribute

use of doc.attributes.ColorAttribute in project OpenNotebook by jaltekruse.

the class OvalObject method addDefaultAttributes.

@Override
public void addDefaultAttributes() {
    addAttribute(new IntegerAttribute(PolygonObject.LINE_THICKNESS, 1, 1, 20));
    addAttribute(new ColorAttribute(PolygonObject.FILL_COLOR));
}
Also used : ColorAttribute(doc.attributes.ColorAttribute) IntegerAttribute(doc.attributes.IntegerAttribute)

Example 7 with ColorAttribute

use of doc.attributes.ColorAttribute in project OpenNotebook by jaltekruse.

the class CubeObject method addDefaultAttributes.

@Override
public void addDefaultAttributes() {
    addAttribute(new IntegerAttribute(LINE_THICKNESS, 1, 1, 20));
    addAttribute(new ColorAttribute(FILL_COLOR, null));
    addAttribute(new BooleanAttribute(HORIZONTALLY_FLIPPED, false, false));
    addAttribute(new BooleanAttribute(VERTICALLY_FLIPPED, false, false));
}
Also used : BooleanAttribute(doc.attributes.BooleanAttribute) ColorAttribute(doc.attributes.ColorAttribute) IntegerAttribute(doc.attributes.IntegerAttribute)

Example 8 with ColorAttribute

use of doc.attributes.ColorAttribute in project OpenNotebook by jaltekruse.

the class GraphObject method setDefaults.

public void setDefaults() {
    try {
        addList(new ListAttribute<>(EXPRESSIONS, new StringAttribute(EXPRESSION), 6, true, false));
        addList(new ListAttribute<>(POINTS, new GridPointAttribute("", -7E8, 7E8, -7E8, 7E8), 1000000, true, false));
        addList(new ListAttribute<>(LINE_GRAPH, new GridPointAttribute("", -7E8, 7E8, -7E8, 7E8), 1000000, true, false));
        addList(new ListAttribute<>(BAR_GRAPH_VALUES, new DoubleAttribute("", -7E8, 7E8), 50, false, true));
        addAttribute(new IntegerAttribute(BAR_GRAPH_GROUP_SIZE, 1, 1, 100, false));
        addList(new ListAttribute<>(BAR_GRAPH_LABELS, new StringAttribute(""), 100, false, true));
        addAttribute(new SelectionAttribute(SELECTION, new Selection(), false));
        addAttribute(new DoubleAttribute(X_MIN, -7E8, 7E8, true, true));
        getAttributeWithName(X_MIN).setValueWithString("-5");
        addAttribute(new DoubleAttribute(X_MAX, -7E8, 7E8, true, true));
        getAttributeWithName(X_MAX).setValueWithString("5");
        addAttribute(new DoubleAttribute(Y_MIN, -7E8, 7E8, true, true));
        getAttributeWithName(Y_MIN).setValueWithString("-5");
        addAttribute(new DoubleAttribute(Y_MAX, -7E8, 7E8, true, true));
        getAttributeWithName(Y_MAX).setValueWithString("5");
        addAttribute(new DoubleAttribute(X_STEP, -3E8, 3E8, true, true));
        getAttributeWithName(X_STEP).setValueWithString("1");
        addAttribute(new DoubleAttribute(Y_STEP, -3E8, 3E8, true, true));
        getAttributeWithName(Y_STEP).setValueWithString("1");
        addAttribute(new IntegerAttribute(FONT_SIZE, 1, 20));
        getAttributeWithName(FONT_SIZE).setValueWithString("8");
        addAttribute(new BooleanAttribute(SHOW_AXIS));
        getAttributeWithName(SHOW_AXIS).setValue(true);
        addAttribute(new BooleanAttribute(SHOW_NUMBERS));
        getAttributeWithName(SHOW_NUMBERS).setValue(true);
        addAttribute(new BooleanAttribute(SHOW_GRID));
        getAttributeWithName(SHOW_GRID).setValue(true);
        addAttribute(new ColorAttribute(LINE_GRAPH_COLOR));
        getAttributeWithName(LINE_GRAPH_COLOR).setValue(Color.BLUE);
    } catch (Exception e) {
        e.printStackTrace();
    }
}
Also used : BooleanAttribute(doc.attributes.BooleanAttribute) Selection(doc_gui.graph.Selection) GridPointAttribute(doc.attributes.GridPointAttribute) StringAttribute(doc.attributes.StringAttribute) ColorAttribute(doc.attributes.ColorAttribute) IntegerAttribute(doc.attributes.IntegerAttribute) SelectionAttribute(doc.attributes.SelectionAttribute) AttributeException(doc.attributes.AttributeException) DoubleAttribute(doc.attributes.DoubleAttribute)

Example 9 with ColorAttribute

use of doc.attributes.ColorAttribute in project OpenNotebook by jaltekruse.

the class CylinderObject method addDefaultAttributes.

@Override
public void addDefaultAttributes() {
    addAttribute(new IntegerAttribute(LINE_THICKNESS, 1, 1, 20));
    addAttribute(new ColorAttribute(FILL_COLOR, null));
    BooleanAttribute flipped = new BooleanAttribute(VERTICALLY_FLIPPED, false);
    flipped.setUserEditable(false);
    addAttribute(flipped);
}
Also used : BooleanAttribute(doc.attributes.BooleanAttribute) ColorAttribute(doc.attributes.ColorAttribute) IntegerAttribute(doc.attributes.IntegerAttribute)

Aggregations

ColorAttribute (doc.attributes.ColorAttribute)9 IntegerAttribute (doc.attributes.IntegerAttribute)8 BooleanAttribute (doc.attributes.BooleanAttribute)7 StringAttribute (doc.attributes.StringAttribute)2 AttributeException (doc.attributes.AttributeException)1 DoubleAttribute (doc.attributes.DoubleAttribute)1 GridPointAttribute (doc.attributes.GridPointAttribute)1 SelectionAttribute (doc.attributes.SelectionAttribute)1 Selection (doc_gui.graph.Selection)1 Color (java.awt.Color)1 GridBagConstraints (java.awt.GridBagConstraints)1 GridBagLayout (java.awt.GridBagLayout)1 Insets (java.awt.Insets)1 ItemEvent (java.awt.event.ItemEvent)1 ItemListener (java.awt.event.ItemListener)1 MouseEvent (java.awt.event.MouseEvent)1 MouseListener (java.awt.event.MouseListener)1 JCheckBox (javax.swing.JCheckBox)1 JLabel (javax.swing.JLabel)1 LineBorder (javax.swing.border.LineBorder)1