mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-347370 Ability to request and activate free license from the IDE
GitOrigin-RevId: cd386d732c84141549f7aa4d06c79e40308cb7ee
This commit is contained in:
committed by
intellij-monorepo-bot
parent
b1e0456b06
commit
f2ac6c22aa
+22
-12
@@ -12,10 +12,7 @@ import java.awt.Graphics
|
||||
import java.awt.event.ActionEvent
|
||||
import java.awt.event.MouseAdapter
|
||||
import java.awt.event.MouseEvent
|
||||
import javax.swing.AbstractAction
|
||||
import javax.swing.Icon
|
||||
import javax.swing.JButton
|
||||
import javax.swing.SwingConstants
|
||||
import javax.swing.*
|
||||
|
||||
object OnboardingDialogButtons {
|
||||
fun createLinkButton(@Nls text: String, icon: Icon?, onClick: Runnable?): JButton {
|
||||
@@ -90,23 +87,36 @@ object OnboardingDialogButtons {
|
||||
fun createMainButton(@Nls text: String, icon: Icon?, onClick: Runnable? = null): JButton {
|
||||
return createButton(true, text, icon, onClick)
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun createMainButton(action: Action): JButton {
|
||||
return createButton(true, action)
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun createButton(@Nls text: String, icon: Icon?, onClick: Runnable? = null): JButton {
|
||||
return createButton(false, text, icon, onClick)
|
||||
}
|
||||
|
||||
private fun createButton(isDefault: Boolean, @Nls text: String, icon: Icon?, onClick: Runnable? = null): JButton {
|
||||
@JvmStatic
|
||||
fun createButton(action: Action): JButton {
|
||||
return createButton(false, action)
|
||||
}
|
||||
|
||||
private fun createButton(isDefault: Boolean, action: Action): JButton {
|
||||
val btn = createButton(isDefault)
|
||||
onClick?.let {runnable ->
|
||||
btn.action = object : AbstractAction(text, icon) {
|
||||
override fun actionPerformed(e: ActionEvent) {
|
||||
runnable.run()
|
||||
}
|
||||
}
|
||||
}
|
||||
btn.action = action
|
||||
return btn
|
||||
}
|
||||
|
||||
private fun createButton(isDefault: Boolean, @Nls text: String, icon: Icon?, onClick: Runnable? = null): JButton {
|
||||
return createButton(isDefault, object : AbstractAction(text, icon) {
|
||||
override fun actionPerformed(e: ActionEvent) {
|
||||
onClick?.run()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
fun createButton(isDefault: Boolean): JButton {
|
||||
val btn = object: JButton() {
|
||||
override fun getComponentGraphics(g: Graphics?): Graphics {
|
||||
|
||||
Reference in New Issue
Block a user