本文整理汇总了Java中org.pentaho.di.core.NotePadMeta.isSelected方法的典型用法代码示例。如果您正苦于以下问题:Java NotePadMeta.isSelected方法的具体用法?Java NotePadMeta.isSelected怎么用?Java NotePadMeta.isSelected使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pentaho.di.core.NotePadMeta
的用法示例。
在下文中一共展示了NotePadMeta.isSelected方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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;
}
示例2: nrSelectedNotes
import org.pentaho.di.core.NotePadMeta; //导入方法依赖的package包/类
/**
* Count the number of selected notes in this transformation
*
* @return The number of selected notes.
*/
public int nrSelectedNotes()
{
int i, count;
count = 0;
for (i = 0; i < nrNotes(); i++)
{
NotePadMeta ni = getNote(i);
if (ni.isSelected()) count++;
}
return count;
}
示例3: getSelectedNotes
import org.pentaho.di.core.NotePadMeta; //导入方法依赖的package包/类
/**
* @return A list of all the selected notes.
*/
public List<NotePadMeta> getSelectedNotes()
{
List<NotePadMeta> selection =new ArrayList<NotePadMeta>();
for (NotePadMeta note : notes) {
if (note.isSelected()) {
selection.add(note);
}
}
return selection;
}
示例4: getSelectedNotes
import org.pentaho.di.core.NotePadMeta; //导入方法依赖的package包/类
/**
* Get an array of all the selected notes
*
* @return An array of all the selected notes.
*/
public List<NotePadMeta> getSelectedNotes()
{
List<NotePadMeta> selection =new ArrayList<NotePadMeta>();
for (NotePadMeta note : notes) {
if (note.isSelected()) {
selection.add(note);
}
}
return selection;
}
示例5: drawNote
import org.pentaho.di.core.NotePadMeta; //导入方法依赖的package包/类
private void drawNote(GC gc, NotePadMeta notePadMeta)
{
int flags = SWT.DRAW_DELIMITER | SWT.DRAW_TAB | SWT.DRAW_TRANSPARENT;
if (notePadMeta.isSelected()) gc.setLineWidth(2); else gc.setLineWidth(1);
org.eclipse.swt.graphics.Point ext;
if (Const.isEmpty(notePadMeta.getNote()))
{
ext = new org.eclipse.swt.graphics.Point(10,10); // Empty note
}
else
{
ext = gc.textExtent(notePadMeta.getNote(), flags);
}
Point p = new Point(ext.x, ext.y);
Point loc = notePadMeta.getLocation();
Point note = real2screen(loc.x, loc.y, offset);
int margin = Const.NOTE_MARGIN;
p.x += 2 * margin;
p.y += 2 * margin;
int width = notePadMeta.width;
int height = notePadMeta.height;
if (p.x > width) width = p.x;
if (p.y > height) height = p.y;
int noteshape[] = new int[] { note.x, note.y, // Top left
note.x + width + 2 * margin, note.y, // Top right
note.x + width + 2 * margin, note.y + height, // bottom right 1
note.x + width, note.y + height + 2 * margin, // bottom right 2
note.x + width, note.y + height, // bottom right 3
note.x + width + 2 * margin, note.y + height, // bottom right 1
note.x + width, note.y + height + 2 * margin, // bottom right 2
note.x, note.y + height + 2 * margin // bottom left
};
gc.setForeground(darkGray);
gc.setBackground(yellow);
gc.fillPolygon(noteshape);
gc.drawPolygon(noteshape);
gc.setForeground(black);
if ( !Const.isEmpty(notePadMeta.getNote()) )
{
gc.drawText(notePadMeta.getNote(), note.x + margin, note.y + margin, flags);
}
notePadMeta.width = width; // Save for the "mouse" later on...
notePadMeta.height = height;
if (notePadMeta.isSelected()) gc.setLineWidth(1); else gc.setLineWidth(2);
// Add to the list of areas...
//
if (!shadow) {
areaOwners.add(new AreaOwner(note.x, note.y, width, height, transMeta, notePadMeta));
}
}