borderColor = new Color( shell.getDisplay(), new RGB( notePadMeta.getBorderColorRed(), notePadMeta .getBorderColorGreen(), notePadMeta.getBorderColorBlue() ) ); wDrawShadow.setSelection( notePadMeta.isDrawShadow() ); } else {
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(); } }
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(); } }
/** * * @param rep * @param id_transformation * @throws KettleException */ public void saveNotePadMeta( NotePadMeta note, ObjectId id_transformation ) throws KettleException { try { Point location = note.getLocation(); int x = location == null ? -1 : location.x; int y = location == null ? -1 : location.y; // Insert new Note in repository note.setObjectId( insertNote( note.getNote(), x, y, note.getWidth(), note.getHeight(), note.getFontName(), note.getFontSize(), note .isFontBold(), note.isFontItalic(), note.getFontColorRed(), note.getFontColorGreen(), note .getFontColorBlue(), note.getBackGroundColorRed(), note.getBackGroundColorGreen(), note .getBackGroundColorBlue(), note.getBorderColorRed(), note.getBorderColorGreen(), note .getBorderColorBlue(), note.isDrawShadow() ) ); } catch ( KettleDatabaseException dbe ) { throw new KettleException( "Unable to save notepad in repository (id_transformation=" + id_transformation + ")", dbe ); } }
gc.setForeground( notePadMeta.getBorderColorRed(), notePadMeta.getBorderColorGreen(), notePadMeta .getBorderColorBlue() );
ni.setBorderColorGreen( n.getBorderColorGreen() ); ni.setBorderColorBlue( n.getBorderColorBlue() ); ni.setDrawShadow( n.isDrawShadow() );
ni.setBorderColorGreen( n.getBorderColorGreen() ); ni.setBorderColorBlue( n.getBorderColorBlue() ); ni.setDrawShadow( n.isDrawShadow() );