IDEMPIERE-77 Start on the left, Cancel on the right
This commit is contained in:
parent
462cd17efc
commit
549f7c3249
|
@ -19,7 +19,7 @@
|
|||
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${workspace_loc}"/>
|
||||
<stringAttribute key="pde.version" value="3.3"/>
|
||||
<stringAttribute key="product" value="org.adempiere.server.server_product"/>
|
||||
<stringAttribute key="selected_target_plugins" value="com.springsource.javax.activation@default:default,com.springsource.javax.ejb@default:default,com.springsource.javax.jms@default:default,com.springsource.javax.mail@default:default,com.springsource.javax.management.j2ee@default:default,com.springsource.javax.xml.rpc@default:default,com.springsource.javax.xml.soap@default:default,com.springsource.net.sf.cglib@default:default,com.springsource.org.apache.activemq@default:default,com.springsource.org.apache.commons.logging@default:default,com.springsource.org.apache.kahadb@default:default,javax.el@default:default,javax.servlet.jsp@default:default,javax.servlet@default:default,javax.xml@default:default,org.apache.ant@default:default,org.apache.commons.collections@default:default,org.apache.commons.logging@default:default,org.apache.commons.net@default:default,org.apache.poi@default:default,org.eclipse.ant.core@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.osgi.services@default:default,org.eclipse.osgi@-1:true,org.hamcrest.core@default:default,org.junit@default:default,org.restlet@default:default"/>
|
||||
<stringAttribute key="selected_target_plugins" value="com.springsource.javax.activation@default:default,com.springsource.javax.ejb@default:default,com.springsource.javax.jms@default:default,com.springsource.javax.mail@default:default,com.springsource.javax.management.j2ee@default:default,com.springsource.javax.xml.rpc@default:default,com.springsource.javax.xml.soap@default:default,com.springsource.net.sf.cglib@default:default,com.springsource.org.apache.activemq@default:default,com.springsource.org.apache.commons.logging@default:default,com.springsource.org.apache.kahadb@default:default,javax.el@default:default,javax.servlet.jsp@default:default,javax.servlet@default:default,javax.xml@default:default,org.apache.ant@default:default,org.apache.commons.collections@default:default,org.apache.commons.logging@default:default,org.apache.commons.net@default:default,org.apache.poi@default:default,org.eclipse.ant.core@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.osgi.services@default:default,org.eclipse.osgi@-1:true,org.hamcrest.core@default:default,org.junit@default:default,org.restlet*2.0.14.0@default:default,org.restlet*2.0.15.0@default:default"/>
|
||||
<stringAttribute key="selected_workspace_plugins" value="org.adempiere.base@default:default,org.adempiere.extend@default:false,org.adempiere.install@default:true,org.apache.ecs@default:default,org.compiere.db.oracle.provider@default:default,org.compiere.db.postgresql.provider@default:default"/>
|
||||
<booleanAttribute key="show_selected_only" value="false"/>
|
||||
<stringAttribute key="templateConfig" value="${target_home}/configuration/config.ini"/>
|
||||
|
|
|
@ -23,6 +23,7 @@ import java.awt.HeadlessException;
|
|||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JDialog;
|
||||
import javax.swing.JFrame;
|
||||
|
@ -86,11 +87,14 @@ public class KeyStoreDialog extends JDialog implements ActionListener
|
|||
private JTextField fS = new JTextField(20);
|
||||
private JLabel lC = new JLabel("(C) Country (2 Char)");
|
||||
private JTextField fC = new JTextField(2);
|
||||
|
||||
private JButton bOK = ConfirmPanel.createOKButton("OK");
|
||||
private JButton bCancel = ConfirmPanel.createCancelButton("Cancel");
|
||||
// Invert OK/Cancel IDEMPIERE-77
|
||||
private JButton bOK = ConfirmPanel.createOKButton("");
|
||||
private JButton bCancel = ConfirmPanel.createCancelButton("");
|
||||
private boolean m_ok = false;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Static Layout
|
||||
*/
|
||||
|
@ -115,12 +119,14 @@ public class KeyStoreDialog extends JDialog implements ActionListener
|
|||
getContentPane().add (panel, BorderLayout.CENTER);
|
||||
//
|
||||
JPanel confirmPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT));
|
||||
confirmPanel.add(bCancel);
|
||||
// Invert OK/Cancel IDEMPIERE-77
|
||||
confirmPanel.add(bOK);
|
||||
confirmPanel.add(bCancel);
|
||||
getContentPane().add (confirmPanel, BorderLayout.SOUTH);
|
||||
//
|
||||
bCancel.addActionListener(this);
|
||||
bOK.addActionListener(this);
|
||||
bCancel.addActionListener(this);
|
||||
|
||||
} // jbInit
|
||||
|
||||
/**
|
||||
|
|
|
@ -24,6 +24,7 @@ import java.awt.event.ActionListener;
|
|||
import java.awt.event.KeyEvent;
|
||||
|
||||
import javax.swing.Icon;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JDialog;
|
||||
import javax.swing.JFrame;
|
||||
|
@ -48,7 +49,8 @@ public final class ConfirmPanel extends JPanel
|
|||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 6041019802043360966L;
|
||||
|
||||
private static ImageIcon ImagenCancel = new ImageIcon("/images/Cancel24.png");
|
||||
private static ImageIcon ImagenOk = new ImageIcon("/images/Ok24.png");
|
||||
|
||||
/**
|
||||
* Create OK Button with label text and F4 Shortcut
|
||||
|
@ -61,6 +63,7 @@ public final class ConfirmPanel extends JPanel
|
|||
JButton button = (JButton)aa.getButton();
|
||||
button.setMargin(s_insets);
|
||||
button.setDefaultCapable(true);
|
||||
button.setIcon(ImagenOk);
|
||||
return button;
|
||||
} // createOKButton
|
||||
|
||||
|
@ -86,6 +89,7 @@ public final class ConfirmPanel extends JPanel
|
|||
AppsAction aa = new AppsAction (A_CANCEL, KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), text);
|
||||
JButton button = (JButton)aa.getButton();
|
||||
button.setMargin(s_insets);
|
||||
button.setIcon(ImagenCancel);
|
||||
return button;
|
||||
} // createCancelButton
|
||||
|
||||
|
@ -494,10 +498,11 @@ public final class ConfirmPanel extends JPanel
|
|||
//
|
||||
JPanel okCancel = new JPanel(new FlowLayout(FlowLayout.RIGHT));
|
||||
okCancel.setOpaque(false);
|
||||
bCancel = createCancelButton(withText);
|
||||
okCancel.add(bCancel);
|
||||
// Invert OK/Cancel IDEMPIERE-77
|
||||
bOK = createOKButton(withText);
|
||||
okCancel.add(bOK);
|
||||
bCancel = createCancelButton(withText);
|
||||
okCancel.add(bCancel);
|
||||
setCancelVisible(withCancelButton);
|
||||
this.add(okCancel, BorderLayout.EAST);
|
||||
//
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1903,7 +1903,8 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
|
|||
div.appendChild(hbox);
|
||||
|
||||
Button btnOk = new Button();
|
||||
btnOk.setLabel(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "OK")));
|
||||
// Invert - Unify OK/Cancel IDEMPIERE-77
|
||||
//btnOk.setLabel(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "OK")));
|
||||
btnOk.setImage("/images/Ok16.png");
|
||||
btnOk.addEventListener(Events.ON_CLICK, new EventListener<Event>()
|
||||
{
|
||||
|
@ -1953,7 +1954,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
|
|||
hbox.appendChild(btnOk);
|
||||
|
||||
Button btnCancel = new Button();
|
||||
btnCancel.setLabel(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Cancel")));
|
||||
//btnCancel.setLabel(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Cancel")));
|
||||
btnCancel.setImage("/images/Cancel16.png");
|
||||
btnCancel.addEventListener(Events.ON_CLICK, new EventListener<Event>()
|
||||
{
|
||||
|
|
|
@ -168,15 +168,17 @@ public class ProcessDialog extends Window implements EventListener<Event>, IProc
|
|||
Div div = new Div();
|
||||
Hbox hbox = new Hbox();
|
||||
String label = Msg.getMsg(Env.getCtx(), "Start");
|
||||
bOK = new Button(label.replaceAll("&", ""));
|
||||
// Invert - Unify OK/Cancel IDEMPIERE-77
|
||||
//bOK = new Button(label.replaceAll("&", ""));
|
||||
bOK = new Button();
|
||||
bOK.setImage("/images/Ok16.png");
|
||||
bOK.setId("Ok");
|
||||
bOK.addEventListener(Events.ON_CLICK, this);
|
||||
bOK.setSclass("action-image-text-button");
|
||||
hbox.appendChild(bOK);
|
||||
|
||||
label = Msg.getMsg(Env.getCtx(), "Cancel");
|
||||
Button btn = new Button(label.replaceAll("&", ""));
|
||||
//label = Msg.getMsg(Env.getCtx(), "Cancel");
|
||||
Button btn = new Button();
|
||||
btn.setImage("/images/Cancel16.png");
|
||||
btn.setId("Cancel");
|
||||
btn.addEventListener(Events.ON_CLICK, this);
|
||||
|
|
|
@ -174,13 +174,15 @@ public class ProcessModalDialog extends Window implements EventListener<Event>,
|
|||
Hbox hbox = new Hbox();
|
||||
hbox.setWidth("100%");
|
||||
hbox.setStyle("margin-top: 10px");
|
||||
Button btn = new Button("Ok");
|
||||
Button btn = new Button("");
|
||||
btn.setImage("/images/Ok24.png");
|
||||
LayoutUtils.addSclass("action-text-button", btn);
|
||||
btn.setId("Ok");
|
||||
btn.addEventListener(Events.ON_CLICK, this);
|
||||
hbox.appendChild(btn);
|
||||
|
||||
btn = new Button("Cancel");
|
||||
btn = new Button("");
|
||||
btn.setImage("/images/Cancel24.png");
|
||||
btn.setId("Cancel");
|
||||
LayoutUtils.addSclass("action-text-button", btn);
|
||||
btn.addEventListener(Events.ON_CLICK, this);
|
||||
|
|
|
@ -56,7 +56,7 @@ public final class ConfirmPanel extends Hbox
|
|||
public static final String A_HISTORY = "History";
|
||||
/** Action String Zoom. */
|
||||
public static final String A_ZOOM = "Zoom";
|
||||
|
||||
|
||||
/** Action String Process. */
|
||||
public static final String A_PROCESS = "Process";
|
||||
/** Action String Print. */
|
||||
|
@ -171,11 +171,11 @@ public final class ConfirmPanel extends Hbox
|
|||
|
||||
init();
|
||||
|
||||
addComponentsRight(createButton(A_OK));
|
||||
|
||||
setVisible(A_CANCEL, withCancelButton);
|
||||
if (withCancelButton)
|
||||
addComponentsRight(createButton(A_CANCEL));
|
||||
|
||||
addComponentsRight(createButton(A_OK));
|
||||
addComponentsRight(createButton(A_CANCEL));
|
||||
|
||||
if (withRefreshButton)
|
||||
{
|
||||
|
|
|
@ -112,13 +112,13 @@ public class Messagebox extends Window implements EventListener<Event>
|
|||
Properties ctx = Env.getCtx();
|
||||
lblMsg.setEncode(false);
|
||||
lblMsg.setValue(msg);
|
||||
|
||||
btnOk.setLabel(Util.cleanAmp(Msg.getMsg(ctx, "OK")));
|
||||
// Invert - Unify OK/Cancel IDEMPIERE-77
|
||||
//btnOk.setLabel(Util.cleanAmp(Msg.getMsg(ctx, "OK")));
|
||||
btnOk.setImage("/images/Ok16.png");
|
||||
btnOk.addEventListener(Events.ON_CLICK, this);
|
||||
LayoutUtils.addSclass("action-text-button", btnOk);
|
||||
|
||||
btnCancel.setLabel(Util.cleanAmp(Msg.getMsg(ctx, "Cancel")));
|
||||
//btnCancel.setLabel(Util.cleanAmp(Msg.getMsg(ctx, "Cancel")));
|
||||
btnCancel.setImage("/images/Cancel16.png");
|
||||
btnCancel.addEventListener(Events.ON_CLICK, this);
|
||||
LayoutUtils.addSclass("action-text-button", btnCancel);
|
||||
|
|
|
@ -271,7 +271,7 @@ public class CustomizeGridViewPanel extends Panel
|
|||
southPanel.setAlign("Right");
|
||||
southPanel.setStyle("margin-top: 2px; margin-right: 4px");
|
||||
String label = Msg.getMsg(Env.getCtx(), "save");
|
||||
Button bOK = new Button(label);
|
||||
Button bOK = new Button();
|
||||
bOK.setImage("/images/Ok16.png");
|
||||
bOK.setId("Ok");
|
||||
EventListener onClickListener = new EventListener()
|
||||
|
@ -290,7 +290,7 @@ public class CustomizeGridViewPanel extends Panel
|
|||
bOK.setSclass("action-button");
|
||||
southPanel.appendChild(bOK);
|
||||
label = Msg.getMsg(Env.getCtx(), "Cancel");
|
||||
Button btn = new Button(label.replaceAll("&", ""));
|
||||
Button btn = new Button();
|
||||
btn.setImage("/images/Cancel16.png");
|
||||
btn.setId("Cancel");
|
||||
EventListener onClickCancelListener = new EventListener()
|
||||
|
|
|
@ -291,8 +291,9 @@ public class WAttachment extends Window implements EventListener<Event>
|
|||
|
||||
confirmPanel.appendChild(bDeleteAll);
|
||||
confirmPanel.appendChild(bRefresh);
|
||||
confirmPanel.appendChild(bCancel);
|
||||
confirmPanel.appendChild(bOk);
|
||||
confirmPanel.appendChild(bCancel);
|
||||
|
||||
|
||||
text.setTooltiptext(Msg.getElement(Env.getCtx(), "TextMsg"));
|
||||
|
||||
|
|
|
@ -254,15 +254,15 @@ public class WLocatorDialog extends Window implements EventListener
|
|||
boxButtons.setWidth("100%");
|
||||
boxButtons.setStyle("padding: 5px;");
|
||||
boxButtons.setPack("end");
|
||||
|
||||
btnOk.setImage("/images/Ok16.png");
|
||||
btnOk.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
btnCancel.setImage("/images/Cancel16.png");
|
||||
btnCancel.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
btnOk.setImage("/images/Ok16.png");
|
||||
btnOk.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
boxButtons.appendChild(btnCancel);
|
||||
boxButtons.appendChild(btnOk);
|
||||
boxButtons.appendChild(btnCancel);
|
||||
|
||||
mainBox.setWidth("250px");
|
||||
mainBox.setStyle("text-align:right");
|
||||
|
|
|
@ -180,14 +180,14 @@ public class WMediaDialog extends Window implements EventListener<Event>
|
|||
southPane.appendChild(confirmPanel);
|
||||
southPane.setHeight("30px");
|
||||
|
||||
bCancel.setImage("/images/Cancel24.png");
|
||||
bCancel.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
bOk.setImage("/images/Ok24.png");
|
||||
bOk.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
bCancel.setImage("/images/Cancel24.png");
|
||||
bCancel.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
confirmPanel.appendChild(bCancel);
|
||||
confirmPanel.appendChild(bOk);
|
||||
confirmPanel.appendChild(bCancel);
|
||||
|
||||
addEventListener(Events.ON_UPLOAD, this);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue