-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
1,737 additions
and
14 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions
3
resources/org/exbin/utils/guipopup/panel/resources/InspectComponentPanel.properties
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,3 @@ | ||
componentLabel.text=Component | ||
closeButton.text=Close | ||
InspectComponentPanel.showStaticFieldsCheckBox.text=Show static fields |
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,77 @@ | ||
/* | ||
* Copyright (C) ExBin Project | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.exbin.utils.guipopup; | ||
|
||
import com.intellij.openapi.ui.DialogWrapper; | ||
import org.jetbrains.annotations.NotNull; | ||
import org.jetbrains.annotations.Nullable; | ||
|
||
import javax.swing.*; | ||
|
||
/** | ||
* Dialog utilities. | ||
* | ||
* @author ExBin Project (http://exbin.org) | ||
* @version 0.2.0 2018/11/10 | ||
*/ | ||
public class DialogUtils { | ||
|
||
public static final String DIALOG_MENUITEM_EXT = "..."; | ||
|
||
public static DialogWrapper createDialog(JComponent dialogPanel, String dialogTitle) { | ||
return new BinEdDialogWrapper(dialogPanel, dialogTitle); | ||
} | ||
|
||
public static DialogWrapper createDialog(JComponent dialogPanel, String dialogTitle, JComponent focusedComponent) { | ||
return new BinEdDialogWrapper(dialogPanel, dialogTitle, focusedComponent); | ||
} | ||
|
||
public static class BinEdDialogWrapper extends DialogWrapper { | ||
|
||
private final JComponent dialogPanel; | ||
private final JComponent focusedComponent; | ||
|
||
public BinEdDialogWrapper(JComponent dialogPanel, String dialogTitle) { | ||
this(dialogPanel, dialogTitle, dialogPanel); | ||
} | ||
|
||
public BinEdDialogWrapper(JComponent dialogPanel, String dialogTitle, JComponent focusedComponent) { | ||
super(true); | ||
this.dialogPanel = dialogPanel; | ||
this.focusedComponent = focusedComponent; | ||
setTitle(dialogTitle); | ||
init(); | ||
} | ||
|
||
@Nullable | ||
@Override | ||
public JComponent getPreferredFocusedComponent() { | ||
return focusedComponent; | ||
} | ||
|
||
@Nullable | ||
@Override | ||
protected JComponent createCenterPanel() { | ||
return dialogPanel; | ||
} | ||
|
||
@NotNull | ||
@Override | ||
protected Action[] 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
Oops, something went wrong.