本文整理汇总了Java中org.pentaho.di.core.NotePadMeta类的典型用法代码示例。如果您正苦于以下问题:Java NotePadMeta类的具体用法?Java NotePadMeta怎么用?Java NotePadMeta使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NotePadMeta类属于org.pentaho.di.core包,在下文中一共展示了NotePadMeta类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getNote
import org.pentaho.di.core.NotePadMeta; //导入依赖的package包/类
/**
* Find the note that is located on a certain point on the canvas.
*
* @param x the x-coordinate of the point queried
* @param y the y-coordinate of the point queried
* @return The note information if a note is located at the point. Otherwise, if nothing was found: null.
*/
public NotePadMeta getNote(int x, int y)
{
int i, s;
s = notes.size();
for (i = s - 1; i >= 0; i--) // Back to front because drawing goes from start to end
{
NotePadMeta ni = notes.get(i);
Point loc = ni.getLocation();
Point p = new Point(loc.x, loc.y);
if (x >= p.x && x <= p.x + ni.width + 2 * Const.NOTE_MARGIN && y >= p.y && y <= p.y + ni.height + 2 * Const.NOTE_MARGIN) { return ni; }
}
return null;
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:21,代码来源:TransMeta.java
示例2: clearChanged
import org.pentaho.di.core.NotePadMeta; //导入依赖的package包/类
public void clearChanged() {
changedEntries = false;
changedHops = false;
changedNotes = false;
changedDatabases = false;
for (int i = 0; i < nrJobEntries(); i++) {
JobEntryCopy entry = getJobEntry(i);
entry.setChanged(false);
}
for (JobHopMeta hi : jobhops) // Look at all the hops
{
hi.setChanged(false);
}
for (int i = 0; i < nrDatabases(); i++) {
DatabaseMeta db = getDatabase(i);
db.setChanged(false);
}
for (int i = 0; i < nrNotes(); i++) {
NotePadMeta note = getNote(i);
note.setChanged(false);
}
super.clearChanged();
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:25,代码来源:JobMeta.java
示例3: getNote
import org.pentaho.di.core.NotePadMeta; //导入依赖的package包/类
public NotePadMeta getNote(int x, int y) {
int i, s;
s = notes.size();
for (i = s - 1; i >= 0; i--) // Back to front because drawing goes
// from start to end
{
NotePadMeta ni = notes.get(i);
Point loc = ni.getLocation();
Point p = new Point(loc.x, loc.y);
if (x >= p.x && x <= p.x + ni.width + 2 * Const.NOTE_MARGIN && y >= p.y
&& y <= p.y + ni.height + 2 * Const.NOTE_MARGIN) {
return ni;
}
}
return null;
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:17,代码来源:JobMeta.java
示例4: selectAll
import org.pentaho.di.core.NotePadMeta; //导入依赖的package包/类
/**
* Mark all steps in the transformation as selected.
*
*/
public void selectAll()
{
int i;
for (i = 0; i < nrSteps(); i++)
{
StepMeta stepMeta = getStep(i);
stepMeta.setSelected(true);
}
for (i = 0; i < nrNotes(); i++)
{
NotePadMeta ni = getNote(i);
ni.setSelected(true);
}
setChanged();
notifyObservers("refreshGraph");
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:22,代码来源:TransMeta.java
示例5: getSelectedNote
import org.pentaho.di.core.NotePadMeta; //导入依赖的package包/类
/**
* Get the selected note at a certain index
*
* @param nr The index
* @return The selected note
*/
public NotePadMeta getSelectedNote(int nr)
{
int i, count;
count = 0;
for (i = 0; i < nrNotes(); i++)
{
NotePadMeta ni = getNote(i);
if (ni.isSelected())
{
if (nr == count) return ni;
count++;
}
}
return null;
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:22,代码来源:TransMeta.java
示例6: setNew
import org.pentaho.di.core.NotePadMeta; //导入依赖的package包/类
public void setNew(Object prev[], int position[])
{
if (prev.length==0) return;
current=prev;
current_index=position;
previous = null;
if ( prev[0] instanceof StepMeta) type=TYPE_ACTION_NEW_STEP;
if ( prev[0] instanceof DatabaseMeta) type=TYPE_ACTION_NEW_CONNECTION;
if ( prev[0] instanceof TransHopMeta) type=TYPE_ACTION_NEW_HOP;
if ( prev[0] instanceof NotePadMeta) type=TYPE_ACTION_NEW_NOTE;
if ( prev[0] instanceof JobEntryCopy) type=TYPE_ACTION_NEW_JOB_ENTRY;
if ( prev[0] instanceof JobHopMeta) type=TYPE_ACTION_NEW_JOB_HOP;
if ( prev[0] instanceof String[]) type=TYPE_ACTION_NEW_TABLEITEM;
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:17,代码来源:TransAction.java
示例7: setPosition
import org.pentaho.di.core.NotePadMeta; //导入依赖的package包/类
public void setPosition(Object obj[], int idx[], Point prev[], Point curr[])
{
if (prev.length!=curr.length) return;
previous_location=new Point[prev.length];
current_location=new Point[curr.length];
current = obj;
current_index=idx;
for (int i = 0; i < prev.length; i++)
{
previous_location[i] = new Point(prev[i].x, prev[i].y);
current_location[i] = new Point(curr[i].x, curr[i].y);
}
Object fobj = obj[0];
if ( fobj instanceof StepMeta) type=TYPE_ACTION_POSITION_STEP;
if ( fobj instanceof NotePadMeta) type=TYPE_ACTION_POSITION_NOTE;
if ( fobj instanceof JobEntryCopy) type=TYPE_ACTION_POSITION_JOB_ENTRY;
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:21,代码来源:TransAction.java
示例8: 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
示例9: 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
示例10: 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
示例11: selectInRect
import org.pentaho.di.core.NotePadMeta; //导入依赖的package包/类
public void selectInRect(JobMeta jobMeta, org.pentaho.di.core.gui.Rectangle rect) {
int i;
for (i = 0; i < jobMeta.nrJobEntries(); i++) {
JobEntryCopy je = jobMeta.getJobEntry(i);
Point p = je.getLocation();
if (((p.x >= rect.x && p.x <= rect.x + rect.width) || (p.x >= rect.x + rect.width && p.x <= rect.x))
&& ((p.y >= rect.y && p.y <= rect.y + rect.height) || (p.y >= rect.y + rect.height && p.y <= rect.y)))
je.setSelected(true);
}
for (i = 0; i < jobMeta.nrNotes(); i++) {
NotePadMeta ni = jobMeta.getNote(i);
Point a = ni.getLocation();
Point b = new Point(a.x + ni.width, a.y + ni.height);
if (rect.contains(a.x, a.y) && rect.contains(b.x, b.y))
ni.setSelected(true);
}
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:18,代码来源:JobGraph.java
示例12: newNote
import org.pentaho.di.core.NotePadMeta; //导入依赖的package包/类
public void newNote() {
selectionRegion = null;
String title = BaseMessages.getString(PKG, "TransGraph.Dialog.NoteEditor.Title"); //$NON-NLS-1$
NotePadDialog dd = new NotePadDialog(transMeta, shell, title); //$NON-NLS-1$
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();
}
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:19,代码来源:TransGraph.java
示例13: clear
import org.pentaho.di.core.NotePadMeta; //导入依赖的package包/类
public void clear() {
setName( null );
setFilename( null );
jobcopies = new ArrayList<JobEntryCopy>();
jobentries = new ArrayList<JobEntryInterface>();
jobhops = new ArrayList<JobHopMeta>();
notes = new ArrayList<NotePadMeta>();
databases = new ArrayList<DatabaseMeta>();
slaveServers = new ArrayList<SlaveServer>();
logConnection = null;
logTable = null;
arguments = null;
max_undo = Const.MAX_UNDO;
undo = new ArrayList<TransAction>();
undo_position = -1;
addDefaults();
setChanged(false);
created_user = "-"; //$NON-NLS-1$
created_date = new Date();
modifiedUser = "-"; //$NON-NLS-1$
modifiedDate = new Date();
directory = new RepositoryDirectory();
description = null;
jobStatus = -1;
jobVersion = null;
extendedDescription = null;
useBatchId = true;
logfieldUsed = true;
// setInternalKettleVariables(); Don't clear the internal variables for
// ad-hoc jobs, it's ruins the previews
// etc.
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:41,代码来源:JobMeta.java
示例14: raiseNote
import org.pentaho.di.core.NotePadMeta; //导入依赖的package包/类
public void raiseNote(int p) {
// if valid index and not last index
if ((p >= 0) && (p < notes.size() - 1)) {
NotePadMeta note = notes.remove(p);
notes.add(note);
changedNotes = true;
}
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:9,代码来源:JobMeta.java
示例15: lowerNote
import org.pentaho.di.core.NotePadMeta; //导入依赖的package包/类
public void lowerNote(int p) {
// if valid index and not first index
if ((p > 0) && (p < notes.size())) {
NotePadMeta note = notes.remove(p);
notes.add(0, note);
changedNotes = true;
}
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:9,代码来源:JobMeta.java
示例16: haveNotesChanged
import org.pentaho.di.core.NotePadMeta; //导入依赖的package包/类
public boolean haveNotesChanged() {
if (changedNotes)
return true;
for (int i = 0; i < nrNotes(); i++) {
NotePadMeta note = getNote(i);
if (note.hasChanged())
return true;
}
return false;
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:12,代码来源:JobMeta.java
示例17: raiseNote
import org.pentaho.di.core.NotePadMeta; //导入依赖的package包/类
public void raiseNote(int p)
{
// if valid index and not last index
if ((p >=0) && (p < notes.size()-1))
{
NotePadMeta note = notes.remove(p);
notes.add(note);
changed_notes = true;
}
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:11,代码来源:TransMeta.java
示例18: lowerNote
import org.pentaho.di.core.NotePadMeta; //导入依赖的package包/类
public void lowerNote(int p)
{
// if valid index and not first index
if ((p >0) && (p < notes.size()))
{
NotePadMeta note = notes.remove(p);
notes.add(0, note);
changed_notes = true;
}
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:11,代码来源:TransMeta.java
示例19: haveNotesChanged
import org.pentaho.di.core.NotePadMeta; //导入依赖的package包/类
/**
* Checks whether or not any of the notes have been changed.
*
* @return True if the notes have been changed.
*/
public boolean haveNotesChanged()
{
if (changed_notes) return true;
for (int i = 0; i < nrNotes(); i++)
{
NotePadMeta ni = getNote(i);
if (ni.hasChanged()) return true;
}
return false;
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:18,代码来源:TransMeta.java
示例20: unselectAll
import org.pentaho.di.core.NotePadMeta; //导入依赖的package包/类
/**
* Clear the selection of all steps.
*
*/
public void unselectAll()
{
int i;
for (i = 0; i < nrSteps(); i++)
{
StepMeta stepMeta = getStep(i);
stepMeta.setSelected(false);
}
for (i = 0; i < nrNotes(); i++)
{
NotePadMeta ni = getNote(i);
ni.setSelected(false);
}
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:19,代码来源:TransMeta.java
注:本文中的org.pentaho.di.core.NotePadMeta类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论