use of javax.swing.JToggleButton in project android-classyshark by google.
the class Toolbar method buildLeftPanelToggleButton.
private JToggleButton buildLeftPanelToggleButton() {
final ImageIcon toggleIcon = theme.getToggleIcon();
final JToggleButton jToggleButton = new JToggleButton(toggleIcon, true);
jToggleButton.setToolTipText("Show/hide navigation tree");
jToggleButton.setBorderPainted(false);
jToggleButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
toolbarController.onChangeLeftPaneVisibility(jToggleButton.isSelected());
}
});
return jToggleButton;
}
use of javax.swing.JToggleButton in project zaproxy by zaproxy.
the class RequestSplitComponent method initUi.
protected void initUi() {
buttonShowView = new JToggleButton(DisplayUtils.getScaledIcon(new ImageIcon(RequestSplitComponent.class.getResource("/resource/icon/view_split.png"))));
buttonShowView.setToolTipText(BUTTON_TOOL_TIP);
panelOptions = new JPanel();
panelOptions.add(headerViews.getSelectableViewsComponent());
panelOptions.add(bodyViews.getSelectableViewsComponent());
headerViews.addView(createHttpPanelHeaderTextView());
splitMain = new JSplitPane();
splitMain.setDividerSize(3);
splitMain.setResizeWeight(0.5d);
splitMain.setContinuousLayout(false);
splitMain.setOrientation(JSplitPane.VERTICAL_SPLIT);
splitMain.setTopComponent(headerViews.getViewsPanel());
splitMain.setBottomComponent(bodyViews.getViewsPanel());
initViews();
panelMain = new JPanel(new BorderLayout());
panelMain.add(splitMain, BorderLayout.CENTER);
setSelected(false);
}
use of javax.swing.JToggleButton in project zaproxy by zaproxy.
the class HttpPanel method addComponent.
private void addComponent(HttpPanelComponentInterface component) {
synchronized (components) {
final String componentName = component.getName();
if (components.containsKey(componentName)) {
removeComponent(componentName);
}
component.setEditable(isEditable);
component.setEnableViewSelect(isEnableViewSelect);
components.put(componentName, component);
panelContent.add(component.getMainPanel(), componentName);
final JToggleButton button = component.getButton();
button.setActionCommand(componentName);
button.addActionListener(getSwitchComponentItemListener());
button.setEnabled(isEnableViewSelect);
if (component.isEnabled(message)) {
enableComponent(component);
if (currentComponent == null) {
switchComponent(componentName);
} else if (savedLastSelectedComponentName != null && savedLastSelectedComponentName.equals(componentName)) {
switchComponent(componentName);
} else if (savedLastSelectedComponentName == null && currentComponent.getPosition() > component.getPosition()) {
switchComponent(componentName);
}
}
}
}
use of javax.swing.JToggleButton in project zaproxy by zaproxy.
the class MainFrame method getFullLayoutButton.
private JToggleButton getFullLayoutButton() {
if (fullLayoutButton == null) {
fullLayoutButton = new JToggleButton(new ChangeWorkbenchLayoutAction(WorkbenchPanel.class.getResource("/resource/icon/expand_full.png"), WorkbenchPanel.Layout.FULL));
fullLayoutButton.setToolTipText(Constant.messages.getString("view.toolbar.expandFull"));
}
return fullLayoutButton;
}
use of javax.swing.JToggleButton in project zaproxy by zaproxy.
the class HttpPanelSender method getButtonFollowRedirects.
private JToggleButton getButtonFollowRedirects() {
if (followRedirect == null) {
followRedirect = new JToggleButton(new ImageIcon(HttpPanelSender.class.getResource(// Arrow
"/resource/icon/16/118.png")));
// turn
// around
// left
followRedirect.setToolTipText(Constant.messages.getString("manReq.checkBox.followRedirect"));
followRedirect.setSelected(true);
}
return followRedirect;
}
Aggregations