当前位置: 首页>>代码示例>>Java>>正文


Java NotePadMeta.setNote方法代码示例

本文整理汇总了Java中org.pentaho.di.core.NotePadMeta.setNote方法的典型用法代码示例。如果您正苦于以下问题:Java NotePadMeta.setNote方法的具体用法?Java NotePadMeta.setNote怎么用?Java NotePadMeta.setNote使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.pentaho.di.core.NotePadMeta的用法示例。


在下文中一共展示了NotePadMeta.setNote方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: editNote

import org.pentaho.di.core.NotePadMeta; //导入方法依赖的package包/类
protected void editNote(NotePadMeta ni) {
  NotePadMeta before = (NotePadMeta) ni.clone();
  String title = Messages.getString("JobGraph.Dialog.EditNote.Title");
  String message = Messages.getString("JobGraph.Dialog.EditNote.Message");
  EnterTextDialog dd = new EnterTextDialog(shell, title, message, ni.getNote());
  String n = dd.open();
  if (n != null) {
    spoon.addUndoChange(jobMeta, new NotePadMeta[] { before }, new NotePadMeta[] { ni }, new int[] { jobMeta
        .indexOfNote(ni) });
    ni.setChanged();
    ni.setNote(n);
    ni.width = ConstUI.NOTE_MIN_SIZE;
    ni.height = ConstUI.NOTE_MIN_SIZE;
    spoon.refreshGraph();
  }
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:17,代码来源:JobGraph.java

示例2: editNote

import org.pentaho.di.core.NotePadMeta; //导入方法依赖的package包/类
private void editNote(NotePadMeta ni) {
  NotePadMeta before = (NotePadMeta) ni.clone();

  String title = Messages.getString("TransGraph.Dialog.EditNote.Title"); //$NON-NLS-1$
  String message = Messages.getString("TransGraph.Dialog.EditNote.Message"); //$NON-NLS-1$
  EnterTextDialog dd = new EnterTextDialog(shell, title, message, ni.getNote());
  String n = dd.open();
  if (n != null) {
    ni.setChanged();
    ni.setNote(n);
    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();
  }
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:20,代码来源:TransGraph.java

示例3: ok

import org.pentaho.di.core.NotePadMeta; //导入方法依赖的package包/类
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();
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:23,代码来源:NotePadDialog.java

示例4: editNote

import org.pentaho.di.core.NotePadMeta; //导入方法依赖的package包/类
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();
  }
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:36,代码来源:JobGraph.java

示例5: editNote

import org.pentaho.di.core.NotePadMeta; //导入方法依赖的package包/类
private void editNote(NotePadMeta ni) {
  NotePadMeta before = (NotePadMeta) ni.clone();

  String title = BaseMessages.getString(PKG, "TransGraph.Dialog.EditNote.Title"); //$NON-NLS-1$
  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();
  }
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:38,代码来源:TransGraph.java

示例6: loadNotePadMeta

import org.pentaho.di.core.NotePadMeta; //导入方法依赖的package包/类
public NotePadMeta loadNotePadMeta(ObjectId id_note) throws KettleException {
	NotePadMeta note = new NotePadMeta();
	try {
		note.setObjectId(id_note);

		RowMetaAndData r = getNote(id_note);
		if (r != null) {
			note.setNote(r.getString("VALUE_STR", ""));
			int x = (int) r.getInteger("GUI_LOCATION_X", 0L);
			int y = (int) r.getInteger("GUI_LOCATION_Y", 0L);
			note.setLocation(new Point(x, y));
			note.setWidth((int) r.getInteger("GUI_LOCATION_WIDTH", 0L));
			note.setHeight((int) r.getInteger("GUI_LOCATION_HEIGHT", 0L));
			note.setSelected(false);

			// Font
			note.setFontName(r.getString("FONT_NAME", null));
			note.setFontSize((int) r.getInteger("FONT_SIZE", -1));
			note.setFontBold(r.getBoolean("FONT_BOLD", false));
			note.setFontItalic(r.getBoolean("FONT_ITALIC", false));

			// Font color
			note.setFontColorRed((int) r.getInteger("FONT_COLOR_RED", NotePadMeta.COLOR_RGB_BLACK_BLUE));
			note.setFontColorGreen((int) r.getInteger("FONT_COLOR_GREEN", NotePadMeta.COLOR_RGB_BLACK_GREEN));
			note.setFontColorBlue((int) r.getInteger("FONT_COLOR_BLUE", NotePadMeta.COLOR_RGB_BLACK_BLUE));

			// Background color
			note.setBackGroundColorRed((int) r.getInteger("FONT_BACK_GROUND_COLOR_RED", NotePadMeta.COLOR_RGB_DEFAULT_BG_RED));
			note.setBackGroundColorGreen((int) r.getInteger("FONT_BACK_GROUND_COLOR_GREEN", NotePadMeta.COLOR_RGB_DEFAULT_BG_GREEN));
			note.setBackGroundColorBlue((int) r.getInteger("FONT_BACK_GROUND_COLOR_BLUE", NotePadMeta.COLOR_RGB_DEFAULT_BG_BLUE));

			// Border color
			note.setBorderColorRed((int) r.getInteger("FONT_BORDER_COLOR_RED", NotePadMeta.COLOR_RGB_DEFAULT_BORDER_RED));
			note.setBorderColorGreen((int) r.getInteger("FONT_BORDER_COLOR_GREEN", NotePadMeta.COLOR_RGB_DEFAULT_BORDER_GREEN));
			note.setBorderColorBlue((int) r.getInteger("FONT_BORDER_COLOR_BLUE", NotePadMeta.COLOR_RGB_DEFAULT_BORDER_BLUE));
			note.setDrawShadow(r.getBoolean("DRAW_SHADOW", true));

			// Done!
			return note;
		} else {
			note.setObjectId(null);
			throw new KettleException("I couldn't find Notepad with id_note=" + id_note + " in the repository.");
		}
	} catch (KettleDatabaseException dbe) {
		note.setObjectId(null);
		throw new KettleException("Unable to load Notepad from repository (id_note=" + id_note + ")", dbe);
	}
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:49,代码来源:KettleDatabaseRepositoryNotePadDelegate.java


注:本文中的org.pentaho.di.core.NotePadMeta.setNote方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。