-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Open dialogs on the same screen as Reshaper. Use new custom dialogs s…
…ystem to fix blank dialogs opening on Mac OS.
- Loading branch information
Showing
51 changed files
with
730 additions
and
495 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
55 changes: 55 additions & 0 deletions
55
extension/src/main/java/synfron/reshaper/burp/ui/components/TextPromptComponent.java
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,55 @@ | ||
package synfron.reshaper.burp.ui.components; | ||
|
||
import synfron.reshaper.burp.ui.components.shared.IFormComponent; | ||
import synfron.reshaper.burp.ui.models.TextPromptModel; | ||
import synfron.reshaper.burp.ui.utils.DocumentActionListener; | ||
|
||
import javax.swing.*; | ||
import javax.swing.border.EmptyBorder; | ||
import java.awt.*; | ||
import java.awt.event.ActionEvent; | ||
|
||
public class TextPromptComponent extends JPanel implements IFormComponent { | ||
|
||
private final TextPromptModel model; | ||
private JTextPane inputText; | ||
|
||
public TextPromptComponent(TextPromptModel model) { | ||
setLayout(new BorderLayout()); | ||
this.model = model; | ||
initComponent(); | ||
} | ||
|
||
private void initComponent() { | ||
add(getBody(), BorderLayout.CENTER); | ||
} | ||
|
||
private Component getBody() { | ||
JPanel container = new JPanel(new BorderLayout()); | ||
|
||
JScrollPane scrollPane = new JScrollPane(); | ||
scrollPane.setBorder(new EmptyBorder(10,0,0,0)); | ||
|
||
inputText = IFormComponent.addUndo(new JTextPane()); | ||
inputText.setText(model.getText()); | ||
|
||
inputText.getDocument().addDocumentListener(new DocumentActionListener(this::onTextChanged)); | ||
|
||
scrollPane.setViewportView(inputText); | ||
|
||
container.add(new JLabel(model.getDescription()), BorderLayout.PAGE_START); | ||
container.add(scrollPane, BorderLayout.CENTER); | ||
|
||
return container; | ||
} | ||
|
||
private void onTextChanged(ActionEvent actionEvent) { | ||
model.setText(inputText.getText()); | ||
} | ||
|
||
@Override | ||
@SuppressWarnings("unchecked") | ||
public <T extends Component & IFormComponent> T getComponent() { | ||
return (T) this; | ||
} | ||
} |
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
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
2 changes: 0 additions & 2 deletions
2
...ava/synfron/reshaper/burp/ui/components/rules/thens/generate/BytesGeneratorComponent.java
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
2 changes: 1 addition & 1 deletion
2
...ain/java/synfron/reshaper/burp/ui/components/rules/thens/generate/GeneratorComponent.java
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
2 changes: 1 addition & 1 deletion
2
.../java/synfron/reshaper/burp/ui/components/rules/thens/transform/TransformerComponent.java
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
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
2 changes: 1 addition & 1 deletion
2
...nfron/reshaper/burp/ui/components/rules/wizard/vars/CustomVariableTagWizardComponent.java
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
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
2 changes: 1 addition & 1 deletion
2
...fron/reshaper/burp/ui/components/rules/wizard/vars/SpecialVariableTagWizardComponent.java
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.