use of com.intellij.ui.HyperlinkLabel in project android by JetBrains.
the class ConfigureAvdOptionsStep method createUIComponents.
private void createUIComponents() {
Function<ScreenOrientation, Image> orientationIconFunction = new Function<ScreenOrientation, Image>() {
@Override
public Image apply(ScreenOrientation input) {
return IconUtil.toImage(ORIENTATIONS.get(input).myIcon);
}
};
Function<ScreenOrientation, String> orientationNameFunction = new Function<ScreenOrientation, String>() {
@Override
public String apply(ScreenOrientation input) {
return ORIENTATIONS.get(input).myName;
}
};
myOrientationToggle = new ASGallery<ScreenOrientation>(JBList.createDefaultListModel(ScreenOrientation.PORTRAIT, ScreenOrientation.LANDSCAPE), orientationIconFunction, orientationNameFunction, JBUI.size(50, 50), null);
myOrientationToggle.setCellMargin(JBUI.insets(5, 20, 4, 20));
myOrientationToggle.setBackground(JBColor.background());
myOrientationToggle.setForeground(JBColor.foreground());
myHardwareSkinHelpLabel = new HyperlinkLabel("How do I create a custom hardware skin?");
myHardwareSkinHelpLabel.setHyperlinkTarget(AvdWizardUtils.CREATE_SKIN_HELP_LINK);
mySkinComboBox = new SkinChooser(myProject, true);
}
use of com.intellij.ui.HyperlinkLabel in project android by JetBrains.
the class IdeSdksConfigurable method createNdkResetLink.
private void createNdkResetLink() {
myNdkResetHyperlinkLabel = new HyperlinkLabel();
myNdkResetHyperlinkLabel.setHyperlinkText("", "Select", " default NDK");
myNdkResetHyperlinkLabel.addHyperlinkListener(new HyperlinkAdapter() {
@Override
protected void hyperlinkActivated(HyperlinkEvent e) {
// known non-null since otherwise we won't show the link
File androidNdkPath = IdeSdks.getInstance().getAndroidNdkPath();
assert androidNdkPath != null;
myNdkLocationTextField.setText(androidNdkPath.getPath());
}
});
}
use of com.intellij.ui.HyperlinkLabel in project android by JetBrains.
the class AndroidRunConfigurationEditor method createUIComponents.
private void createUIComponents() {
// JBColor keeps a strong reference to its parameter func, so, using a lambda avoids this reference and fixes a leak
myOldVersionLabel = new HyperlinkLabel("", JBColor.RED, new JBColor(UIUtil::getLabelBackground), PlatformColors.BLUE);
setSyncLinkMessage("");
myOldVersionLabel.addHyperlinkListener(this);
}
use of com.intellij.ui.HyperlinkLabel in project android by JetBrains.
the class ResourceTablePanel method createUIComponents.
private void createUIComponents() {
myEditTranslationsLink = new HyperlinkLabel("EDIT TRANSLATIONS");
myEditTranslationsLink.addHyperlinkListener(this);
myEditTranslationsLink.setVisible(false);
}
use of com.intellij.ui.HyperlinkLabel in project android by JetBrains.
the class ConfigureAndroidProjectStepFixture method enterPackageName.
@NotNull
public ConfigureAndroidProjectStepFixture enterPackageName(@NotNull String text) {
LabelWithEditLink link = robot().finder().findByType(target(), LabelWithEditLink.class);
HyperlinkLabel editLabel = robot().finder().findByType(link, HyperlinkLabel.class);
robot().click(editLabel);
JTextComponent textField = findTextFieldWithLabel("Package name:");
replaceText(textField, text);
// click "Done"
robot().click(editLabel);
return this;
}
Aggregations