本文整理汇总了Java中org.pentaho.di.ui.core.widget.StyledTextComp.getLineAtOffset方法的典型用法代码示例。如果您正苦于以下问题:Java StyledTextComp.getLineAtOffset方法的具体用法?Java StyledTextComp.getLineAtOffset怎么用?Java StyledTextComp.getLineAtOffset使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pentaho.di.ui.core.widget.StyledTextComp
的用法示例。
在下文中一共展示了StyledTextComp.getLineAtOffset方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setPosition
import org.pentaho.di.ui.core.widget.StyledTextComp; //导入方法依赖的package包/类
public void setPosition(){
StyledTextComp wScript = getStyledTextComp();
String scr = wScript.getText();
int linenr = wScript.getLineAtOffset(wScript.getCaretOffset())+1;
int posnr = wScript.getCaretOffset();
// Go back from position to last CR: how many positions?
int colnr=0;
while (posnr>0 && scr.charAt(posnr-1)!='\n' && scr.charAt(posnr-1)!='\r')
{
posnr--;
colnr++;
}
wlPosition.setText(Messages.getString("ScriptValuesDialogMod.Position.Label2")+linenr+", "+colnr); //$NON-NLS-1$ //$NON-NLS-2$
}
示例2: setPosition
import org.pentaho.di.ui.core.widget.StyledTextComp; //导入方法依赖的package包/类
public void setPosition(){
StyledTextComp wScript = getStyledTextComp();
String scr = wScript.getText();
int linenr = wScript.getLineAtOffset(wScript.getCaretOffset())+1;
int posnr = wScript.getCaretOffset();
// Go back from position to last CR: how many positions?
int colnr=0;
while (posnr>0 && scr.charAt(posnr-1)!='\n' && scr.charAt(posnr-1)!='\r')
{
posnr--;
colnr++;
}
wlPosition.setText(BaseMessages.getString(PKG, "ScriptDialog.Position.Label2")+linenr+", "+colnr); //$NON-NLS-1$ //$NON-NLS-2$
}
示例3: setPosition
import org.pentaho.di.ui.core.widget.StyledTextComp; //导入方法依赖的package包/类
public void setPosition(){
StyledTextComp wScript = getStyledTextComp();
String scr = wScript.getText();
int linenr = wScript.getLineAtOffset(wScript.getCaretOffset())+1;
int posnr = wScript.getCaretOffset();
// Go back from position to last CR: how many positions?
int colnr=0;
while (posnr>0 && scr.charAt(posnr-1)!='\n' && scr.charAt(posnr-1)!='\r')
{
posnr--;
colnr++;
}
wlPosition.setText(BaseMessages.getString(PKG, "ScriptValuesDialogMod.Position.Label2")+linenr+", "+colnr); //$NON-NLS-1$ //$NON-NLS-2$
}
示例4: setPosition
import org.pentaho.di.ui.core.widget.StyledTextComp; //导入方法依赖的package包/类
public void setPosition() {
StyledTextComp wScript = getStyledTextComp();
String scr = wScript.getText();
int linenr = wScript.getLineAtOffset(wScript.getCaretOffset()) + 1;
int posnr = wScript.getCaretOffset();
// Go back from position to last CR: how many positions?
int colnr = 0;
while (posnr > 0 && scr.charAt(posnr - 1) != '\n' && scr.charAt(posnr - 1) != '\r') {
posnr--;
colnr++;
}
wlPosition
.setText(BaseMessages.getString(PKG, "UserDefinedJavaClassDialog.Position.Label2") + linenr + ", " + colnr); //$NON-NLS-1$ //$NON-NLS-2$
}
示例5: setPosition
import org.pentaho.di.ui.core.widget.StyledTextComp; //导入方法依赖的package包/类
public void setPosition(){
StyledTextComp control = wCondition;
if(wspecifyQuery.getSelection()) control = wQuery;
String scr = control.getText();
int linenr = control.getLineAtOffset(control.getCaretOffset())+1;
int posnr = control.getCaretOffset();
// Go back from position to last CR: how many positions?
int colnr=0;
while (posnr>0 && scr.charAt(posnr-1)!='\n' && scr.charAt(posnr-1)!='\r')
{
posnr--;
colnr++;
}
wlPosition.setText(BaseMessages.getString(PKG, "SalesforceInputDialog.Position.Label",""+linenr,""+colnr));
}
示例6: setPosition
import org.pentaho.di.ui.core.widget.StyledTextComp; //导入方法依赖的package包/类
public void setPosition(){
StyledTextComp wScript = getStyledTextComp();
String scr = wScript.getText();
int linenr = wScript.getLineAtOffset(wScript.getCaretOffset())+1;
int posnr = wScript.getCaretOffset();
// Go back from position to last CR: how many positions?
int colnr=0;
while (posnr>0 && scr.charAt(posnr-1)!='\n' && scr.charAt(posnr-1)!='\r')
{
posnr--;
colnr++;
}
wlPosition.setText(BaseMessages.getString(PKG, "GremlinScriptDialog.Position.Label2")+linenr+", "+colnr);
}
示例7: setPosition
import org.pentaho.di.ui.core.widget.StyledTextComp; //导入方法依赖的package包/类
public void setPosition() {
StyledTextComp wScript = getStyledTextComp();
String scr = wScript.getText();
int linenr = wScript.getLineAtOffset( wScript.getCaretOffset() ) + 1;
int posnr = wScript.getCaretOffset();
// Go back from position to last CR: how many positions?
int colnr = 0;
while ( posnr > 0 && scr.charAt( posnr - 1 ) != '\n' && scr.charAt( posnr - 1 ) != '\r' ) {
posnr--;
colnr++;
}
wlPosition.setText( BaseMessages.getString( PKG, "ScriptValuesDialogMod.Position.Label2" )
+ linenr + ", " + colnr );
}
示例8: setPosition
import org.pentaho.di.ui.core.widget.StyledTextComp; //导入方法依赖的package包/类
public void setPosition() {
StyledTextComp wScript = getStyledTextComp();
String scr = wScript.getText();
int linenr = wScript.getLineAtOffset( wScript.getCaretOffset() ) + 1;
int posnr = wScript.getCaretOffset();
// Go back from position to last CR: how many positions?
int colnr = 0;
while ( posnr > 0 && scr.charAt( posnr - 1 ) != '\n' && scr.charAt( posnr - 1 ) != '\r' ) {
posnr--;
colnr++;
}
wlPosition.setText( BaseMessages.getString( PKG, "UserDefinedJavaClassDialog.Position.Label2" )
+ linenr + ", " + colnr );
}
示例9: setPosition
import org.pentaho.di.ui.core.widget.StyledTextComp; //导入方法依赖的package包/类
public void setPosition() {
StyledTextComp control = wCondition;
if ( wspecifyQuery.getSelection() ) {
control = wQuery;
}
String scr = control.getText();
int linenr = control.getLineAtOffset( control.getCaretOffset() ) + 1;
int posnr = control.getCaretOffset();
// Go back from position to last CR: how many positions?
int colnr = 0;
while ( posnr > 0 && scr.charAt( posnr - 1 ) != '\n' && scr.charAt( posnr - 1 ) != '\r' ) {
posnr--;
colnr++;
}
wlPosition.setText( BaseMessages.getString( PKG, "SalesforceInputDialog.Position.Label", "" + linenr, ""
+ colnr ) );
}
示例10: setPosition
import org.pentaho.di.ui.core.widget.StyledTextComp; //导入方法依赖的package包/类
public void setPosition() {
StyledTextComp wScript = getStyledTextComp();
String scr = wScript.getText();
int linenr = wScript.getLineAtOffset( wScript.getCaretOffset() ) + 1;
int posnr = wScript.getCaretOffset();
// Go back from position to last CR: how many positions?
int colnr = 0;
while ( posnr > 0 && scr.charAt( posnr - 1 ) != '\n' && scr.charAt( posnr - 1 ) != '\r' ) {
posnr--;
colnr++;
}
wlPosition.setText( BaseMessages.getString( PKG, "ScriptDialog.Position.Label2" ) + linenr + ", " + colnr );
}