use of doc_gui.OCButton in project OpenNotebook by jaltekruse.
the class ObjectPropertiesFrame method createExpressionModifier.
private JPanel createExpressionModifier() {
JPanel newPanel = new JPanel();
newPanel.setLayout(new GridBagLayout());
ImageIcon pic;
new OCButton(ExpressionObject.SUB_IN_VALUE, 4, 1, 0, 0, newPanel) {
public void associatedAction() {
buttonAction(ExpressionObject.SUB_IN_VALUE);
}
};
new OCButton(ExpressionObject.MODIFY_EXPRESSION, 4, 1, 0, 1, newPanel) {
public void associatedAction() {
buttonAction(ExpressionObject.MODIFY_EXPRESSION);
}
};
new OCButton(ExpressionObject.MANUALLY_TYPE_STEP, 4, 1, 0, 2, newPanel) {
public void associatedAction() {
buttonAction(ExpressionObject.MANUALLY_TYPE_STEP);
}
};
new OCButton(ExpressionObject.UNDO_STEP, 4, 1, 0, 3, newPanel) {
public void associatedAction() {
buttonAction(ExpressionObject.UNDO_STEP);
}
};
GridBagConstraints con = new GridBagConstraints();
con.fill = GridBagConstraints.HORIZONTAL;
con.gridx = 0;
con.gridy = 4;
con.gridwidth = 4;
con.weightx = 1;
con.weighty = .02;
newPanel.add(new JLabel("Apply to both sides"), con);
createButton(ExpressionObject.ADD_TO_BOTH_SIDES, 1, 1, 0, 5, newPanel);
createButton(ExpressionObject.SUBTRACT_FROM_BOTH_SIDES, 1, 1, 1, 5, newPanel);
createButton(ExpressionObject.MULTIPLY_BOTH_SIDES, 1, 1, 2, 5, newPanel);
createButton(ExpressionObject.DIVIDE_BOTH_SIDES, 1, 1, 3, 5, newPanel);
new OCButton(ExpressionObject.OTHER_OPERATIONS, 4, 1, 0, 6, newPanel) {
public void associatedAction() {
buttonAction(ExpressionObject.OTHER_OPERATIONS);
}
};
return newPanel;
}
Aggregations