-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
convert CEF window to dialog. this should fix the window being opened…
… in the background only
- Loading branch information
1 parent
c926caf
commit a5f9ed4
Showing
6 changed files
with
85 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package edu.kit.kastel.login; | ||
|
||
import com.intellij.openapi.project.Project; | ||
import com.intellij.openapi.ui.DialogWrapper; | ||
import com.intellij.ui.jcef.JBCefBrowser; | ||
import org.jetbrains.annotations.NotNull; | ||
import org.jetbrains.annotations.Nullable; | ||
|
||
import javax.swing.Action; | ||
import javax.swing.JComponent; | ||
import javax.swing.JPanel; | ||
import java.awt.GridLayout; | ||
|
||
public class CefDialog extends DialogWrapper { | ||
private final JBCefBrowser browser; | ||
|
||
public CefDialog(JBCefBrowser browser) { | ||
super((Project) null); | ||
this.browser = browser; | ||
|
||
this.setTitle("Artemis Login"); | ||
this.setModal(false); | ||
this.init(); | ||
} | ||
|
||
@Override | ||
protected @Nullable JComponent createCenterPanel() { | ||
JPanel browserContainer = new JPanel(new GridLayout(1, 1)); | ||
browserContainer.add(this.browser.getComponent()); | ||
return browserContainer; | ||
} | ||
|
||
@Override | ||
protected Action @NotNull [] createActions() { | ||
return new Action[0]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters