private void ok() { notePadMeta = new NotePadMeta(); if ( wDesc.getText() != null ) { notePadMeta.setNote( wDesc.getText() ); } if ( wFontName.getText() != null ) { notePadMeta.setFontName( wFontName.getText() ); } notePadMeta.setFontSize( wFontSize.getSelection() ); notePadMeta.setFontBold( wFontBold.getSelection() ); notePadMeta.setFontItalic( wFontItalic.getSelection() ); // font color notePadMeta.setFontColorRed( wFontColor.getBackground().getRed() ); notePadMeta.setFontColorGreen( wFontColor.getBackground().getGreen() ); notePadMeta.setFontColorBlue( wFontColor.getBackground().getBlue() ); // background color notePadMeta.setBackGroundColorRed( wBackGroundColor.getBackground().getRed() ); notePadMeta.setBackGroundColorGreen( wBackGroundColor.getBackground().getGreen() ); notePadMeta.setBackGroundColorBlue( wBackGroundColor.getBackground().getBlue() ); // border color notePadMeta.setBorderColorRed( wBorderColor.getBackground().getRed() ); notePadMeta.setBorderColorGreen( wBorderColor.getBackground().getGreen() ); notePadMeta.setBorderColorBlue( wBorderColor.getBackground().getBlue() ); notePadMeta.setDrawShadow( wDrawShadow.getSelection() ); dispose(); }
if ( n != null ) { ni.setChanged(); ni.setNote( n.getNote() ); ni.setFontName( n.getFontName() ); ni.setFontSize( n.getFontSize() );
ni.setNote( n.getNote() ); ni.setFontName( n.getFontName() ); ni.setFontSize( n.getFontSize() );
note.setNote( r.getString( "VALUE_STR", "" ) ); int x = (int) r.getInteger( "GUI_LOCATION_X", 0L ); int y = (int) r.getInteger( "GUI_LOCATION_Y", 0L );
/** * Loads a NotePadMeta object from a CWM model using the supplied CWM Description object * * @param cwm * @param cwmDescription * @return a newly created NotePadMeta object */ public NotePadMeta getNotePadMeta( CWM cwm, CwmDescription cwmDescription ) { NotePadMeta notePadMeta = new NotePadMeta(); // The text notePadMeta.setNote( cwmDescription.getBody() ); // The position & dimensions notePadMeta.setLocation( cwm.getPositionX( cwmDescription ), cwm.getPositionY( cwmDescription ) ); notePadMeta.setWidth( cwm.getPositionWidth( cwmDescription ) ); notePadMeta.setHeight( cwm.getPositionHeight( cwmDescription ) ); return notePadMeta; }