Search in sources :

Example 1 with NotePadDialog

use of org.pentaho.di.ui.spoon.dialog.NotePadDialog in project pentaho-kettle by pentaho.

the class TransGraph method newNote.

public void newNote() {
    selectionRegion = null;
    String title = BaseMessages.getString(PKG, "TransGraph.Dialog.NoteEditor.Title");
    NotePadDialog dd = new NotePadDialog(transMeta, shell, title);
    NotePadMeta n = dd.open();
    if (n != null) {
        NotePadMeta npi = new NotePadMeta(n.getNote(), lastclick.x, lastclick.y, ConstUI.NOTE_MIN_SIZE, ConstUI.NOTE_MIN_SIZE, n.getFontName(), n.getFontSize(), n.isFontBold(), n.isFontItalic(), n.getFontColorRed(), n.getFontColorGreen(), n.getFontColorBlue(), n.getBackGroundColorRed(), n.getBackGroundColorGreen(), n.getBackGroundColorBlue(), n.getBorderColorRed(), n.getBorderColorGreen(), n.getBorderColorBlue(), n.isDrawShadow());
        transMeta.addNote(npi);
        spoon.addUndoNew(transMeta, new NotePadMeta[] { npi }, new int[] { transMeta.indexOfNote(npi) });
        redraw();
    }
}
Also used : NotePadDialog(org.pentaho.di.ui.spoon.dialog.NotePadDialog) NotePadMeta(org.pentaho.di.core.NotePadMeta)

Example 2 with NotePadDialog

use of org.pentaho.di.ui.spoon.dialog.NotePadDialog in project pentaho-kettle by pentaho.

the class TransGraph method editNote.

private void editNote(NotePadMeta ni) {
    NotePadMeta before = (NotePadMeta) ni.clone();
    String title = BaseMessages.getString(PKG, "TransGraph.Dialog.EditNote.Title");
    NotePadDialog dd = new NotePadDialog(transMeta, shell, title, ni);
    NotePadMeta n = dd.open();
    if (n != null) {
        ni.setChanged();
        ni.setNote(n.getNote());
        ni.setFontName(n.getFontName());
        ni.setFontSize(n.getFontSize());
        ni.setFontBold(n.isFontBold());
        ni.setFontItalic(n.isFontItalic());
        // font color
        ni.setFontColorRed(n.getFontColorRed());
        ni.setFontColorGreen(n.getFontColorGreen());
        ni.setFontColorBlue(n.getFontColorBlue());
        // background color
        ni.setBackGroundColorRed(n.getBackGroundColorRed());
        ni.setBackGroundColorGreen(n.getBackGroundColorGreen());
        ni.setBackGroundColorBlue(n.getBackGroundColorBlue());
        // border color
        ni.setBorderColorRed(n.getBorderColorRed());
        ni.setBorderColorGreen(n.getBorderColorGreen());
        ni.setBorderColorBlue(n.getBorderColorBlue());
        ni.setDrawShadow(n.isDrawShadow());
        ni.width = ConstUI.NOTE_MIN_SIZE;
        ni.height = ConstUI.NOTE_MIN_SIZE;
        NotePadMeta after = (NotePadMeta) ni.clone();
        spoon.addUndoChange(transMeta, new NotePadMeta[] { before }, new NotePadMeta[] { after }, new int[] { transMeta.indexOfNote(ni) });
        spoon.refreshGraph();
    }
}
Also used : NotePadDialog(org.pentaho.di.ui.spoon.dialog.NotePadDialog) NotePadMeta(org.pentaho.di.core.NotePadMeta)

Example 3 with NotePadDialog

use of org.pentaho.di.ui.spoon.dialog.NotePadDialog in project pentaho-kettle by pentaho.

the class JobGraph method newNote.

public void newNote() {
    String title = BaseMessages.getString(PKG, "JobGraph.Dialog.EditNote.Title");
    NotePadDialog dd = new NotePadDialog(jobMeta, shell, title);
    NotePadMeta n = dd.open();
    if (n != null) {
        NotePadMeta npi = new NotePadMeta(n.getNote(), lastclick.x, lastclick.y, ConstUI.NOTE_MIN_SIZE, ConstUI.NOTE_MIN_SIZE, n.getFontName(), n.getFontSize(), n.isFontBold(), n.isFontItalic(), n.getFontColorRed(), n.getFontColorGreen(), n.getFontColorBlue(), n.getBackGroundColorRed(), n.getBackGroundColorGreen(), n.getBackGroundColorBlue(), n.getBorderColorRed(), n.getBorderColorGreen(), n.getBorderColorBlue(), n.isDrawShadow());
        jobMeta.addNote(npi);
        spoon.addUndoNew(jobMeta, new NotePadMeta[] { npi }, new int[] { jobMeta.indexOfNote(npi) });
        redraw();
    }
}
Also used : NotePadDialog(org.pentaho.di.ui.spoon.dialog.NotePadDialog) NotePadMeta(org.pentaho.di.core.NotePadMeta)

Example 4 with NotePadDialog

use of org.pentaho.di.ui.spoon.dialog.NotePadDialog in project pentaho-kettle by pentaho.

the class JobGraph method editNote.

protected void editNote(NotePadMeta ni) {
    NotePadMeta before = (NotePadMeta) ni.clone();
    String title = BaseMessages.getString(PKG, "JobGraph.Dialog.EditNote.Title");
    NotePadDialog dd = new NotePadDialog(jobMeta, shell, title, ni);
    NotePadMeta n = dd.open();
    if (n != null) {
        ni.setChanged();
        ni.setNote(n.getNote());
        ni.setFontName(n.getFontName());
        ni.setFontSize(n.getFontSize());
        ni.setFontBold(n.isFontBold());
        ni.setFontItalic(n.isFontItalic());
        // font color
        ni.setFontColorRed(n.getFontColorRed());
        ni.setFontColorGreen(n.getFontColorGreen());
        ni.setFontColorBlue(n.getFontColorBlue());
        // background color
        ni.setBackGroundColorRed(n.getBackGroundColorRed());
        ni.setBackGroundColorGreen(n.getBackGroundColorGreen());
        ni.setBackGroundColorBlue(n.getBackGroundColorBlue());
        // border color
        ni.setBorderColorRed(n.getBorderColorRed());
        ni.setBorderColorGreen(n.getBorderColorGreen());
        ni.setBorderColorBlue(n.getBorderColorBlue());
        ni.setDrawShadow(n.isDrawShadow());
        spoon.addUndoChange(jobMeta, new NotePadMeta[] { before }, new NotePadMeta[] { ni }, new int[] { jobMeta.indexOfNote(ni) });
        ni.width = ConstUI.NOTE_MIN_SIZE;
        ni.height = ConstUI.NOTE_MIN_SIZE;
        spoon.refreshGraph();
    }
}
Also used : NotePadDialog(org.pentaho.di.ui.spoon.dialog.NotePadDialog) NotePadMeta(org.pentaho.di.core.NotePadMeta)

Aggregations

NotePadMeta (org.pentaho.di.core.NotePadMeta)4 NotePadDialog (org.pentaho.di.ui.spoon.dialog.NotePadDialog)4