📄 abstractuiswtinputreceiver.java
字号:
// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://kpdus.tripod.com/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi space
// Source File Name: AbstractUISWTInputReceiver.java
package org.gudy.azureus2.ui.swt.pluginsimpl;
import org.gudy.azureus2.pluginsimpl.local.ui.AbstractUIInputReceiver;
import org.gudy.azureus2.ui.swt.plugins.UISWTInputReceiver;
public abstract class AbstractUISWTInputReceiver extends AbstractUIInputReceiver
implements UISWTInputReceiver
{
protected boolean select_preentered_text;
protected int line_height;
protected int width_hint;
protected String choices[];
protected boolean choices_allow_edit;
protected int choices_default;
public AbstractUISWTInputReceiver()
{
select_preentered_text = true;
line_height = -1;
width_hint = -1;
choices = null;
choices_allow_edit = true;
choices_default = -1;
}
public void selectPreenteredText(boolean select)
{
assertPrePrompt();
select_preentered_text = select;
}
public void setLineHeight(int line_height)
{
assertPrePrompt();
this.line_height = line_height;
}
public void setWidthHint(int width)
{
assertPrePrompt();
width_hint = width;
}
public void setPreenteredText(String text, boolean as_suggested)
{
if (!choices_allow_edit)
{
throw new RuntimeException("cannot set pre-entered text if you have chosen to use non editable selected items");
} else
{
super.setPreenteredText(text, as_suggested);
return;
}
}
public void setSelectableItems(String choices[], int default_choice, boolean allow_edit)
{
assertPrePrompt();
if (!allow_edit && preentered_text != null)
throw new RuntimeException("cannot set allow_edit to false if you have already set pre-entered text");
if (choices.length == 0)
return;
this.choices = choices;
choices_allow_edit = allow_edit;
choices_default = default_choice;
if (default_choice >= 0 && default_choice < choices.length)
preentered_text = choices[default_choice];
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -