Adempiere 3.1.2
This commit is contained in:
parent
7dd562c52d
commit
297d3015fb
|
@ -438,7 +438,7 @@ class AcctViewerData
|
||||||
rm.addColumn(new RColumn(ctx, "Description", DisplayType.String));
|
rm.addColumn(new RColumn(ctx, "Description", DisplayType.String));
|
||||||
}
|
}
|
||||||
if (PostingType == null || PostingType.length() == 0)
|
if (PostingType == null || PostingType.length() == 0)
|
||||||
rm.addColumn(new RColumn(ctx, RModel.TABLE_ALIAS+".PostingType", DisplayType.List,
|
rm.addColumn(new RColumn(ctx, "PostingType", DisplayType.List,
|
||||||
MFactAcct.POSTINGTYPE_AD_Reference_ID));
|
MFactAcct.POSTINGTYPE_AD_Reference_ID));
|
||||||
return rm;
|
return rm;
|
||||||
} // createRModel
|
} // createRModel
|
||||||
|
|
|
@ -56,8 +56,6 @@ import org.compiere.util.*;
|
||||||
public final class VTreePanel extends CPanel
|
public final class VTreePanel extends CPanel
|
||||||
implements ActionListener, DragGestureListener, DragSourceListener, DropTargetListener
|
implements ActionListener, DragGestureListener, DragSourceListener, DropTargetListener
|
||||||
{
|
{
|
||||||
protected boolean m_lookAndFeelChanged = false;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tree Panel for browsing and editing of a tree.
|
* Tree Panel for browsing and editing of a tree.
|
||||||
* Need to call initTree
|
* Need to call initTree
|
||||||
|
@ -82,16 +80,8 @@ public final class VTreePanel extends CPanel
|
||||||
centerSplitPane.setDividerSize(0);
|
centerSplitPane.setDividerSize(0);
|
||||||
popMenuTree.remove(mBarAdd);
|
popMenuTree.remove(mBarAdd);
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
centerSplitPane.setDividerLocation(80);
|
centerSplitPane.setDividerLocation(80);
|
||||||
UIManager.addPropertyChangeListener(new PropertyChangeListener() {
|
|
||||||
public void propertyChange(PropertyChangeEvent evt) {
|
|
||||||
if ("lookAndFeel".equals(evt.getPropertyName()))
|
|
||||||
m_lookAndFeelChanged = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
// base settings
|
// base settings
|
||||||
if (editable)
|
if (editable)
|
||||||
tree.setDropTarget(dropTarget);
|
tree.setDropTarget(dropTarget);
|
||||||
|
@ -125,7 +115,7 @@ public final class VTreePanel extends CPanel
|
||||||
// Shortcut Bar
|
// Shortcut Bar
|
||||||
if (m_hasBar)
|
if (m_hasBar)
|
||||||
{
|
{
|
||||||
toolbar.removeAll(); // remove all existing buttons
|
bar.removeAll(); // remove all existing buttons
|
||||||
Enumeration en = m_root.preorderEnumeration();
|
Enumeration en = m_root.preorderEnumeration();
|
||||||
while (en.hasMoreElements())
|
while (en.hasMoreElements())
|
||||||
{
|
{
|
||||||
|
@ -154,7 +144,6 @@ public final class VTreePanel extends CPanel
|
||||||
private CMenuItem mFrom = new CMenuItem();
|
private CMenuItem mFrom = new CMenuItem();
|
||||||
private CMenuItem mTo = new CMenuItem();
|
private CMenuItem mTo = new CMenuItem();
|
||||||
private CPanel bar = new CPanel();
|
private CPanel bar = new CPanel();
|
||||||
private JToolBar toolbar = new JToolBar(JToolBar.VERTICAL);
|
|
||||||
private CMenuItem mBarAdd = new CMenuItem();
|
private CMenuItem mBarAdd = new CMenuItem();
|
||||||
private CMenuItem mBarRemove = new CMenuItem();
|
private CMenuItem mBarRemove = new CMenuItem();
|
||||||
private BorderLayout southLayout = new BorderLayout();
|
private BorderLayout southLayout = new BorderLayout();
|
||||||
|
@ -210,8 +199,6 @@ public final class VTreePanel extends CPanel
|
||||||
tree.addKeyListener(keyListener);
|
tree.addKeyListener(keyListener);
|
||||||
tree.setCellRenderer(new VTreeCellRenderer());
|
tree.setCellRenderer(new VTreeCellRenderer());
|
||||||
treePane.getViewport().add(tree, null);
|
treePane.getViewport().add(tree, null);
|
||||||
treePane.setBorder(new ShadowBorder());
|
|
||||||
tree.setBorder(BorderFactory.createEmptyBorder());
|
|
||||||
// treePane.setPreferredSize(new Dimension(50,200));
|
// treePane.setPreferredSize(new Dimension(50,200));
|
||||||
// tree.setPreferredSize(new Dimension(100,150));
|
// tree.setPreferredSize(new Dimension(100,150));
|
||||||
//
|
//
|
||||||
|
@ -232,13 +219,8 @@ public final class VTreePanel extends CPanel
|
||||||
southPanel.add(treeSearch, BorderLayout.EAST);
|
southPanel.add(treeSearch, BorderLayout.EAST);
|
||||||
this.add(southPanel, BorderLayout.SOUTH);
|
this.add(southPanel, BorderLayout.SOUTH);
|
||||||
//
|
//
|
||||||
centerSplitPane.setOpaque(false);
|
|
||||||
toolbar.setOpaque(false);
|
|
||||||
centerSplitPane.add(treePane, JSplitPane.RIGHT);
|
centerSplitPane.add(treePane, JSplitPane.RIGHT);
|
||||||
centerSplitPane.add(bar, JSplitPane.LEFT);
|
centerSplitPane.add(bar, JSplitPane.LEFT);
|
||||||
centerSplitPane.setBorder(BorderFactory.createEmptyBorder());
|
|
||||||
removeSplitPaneBorder();
|
|
||||||
|
|
||||||
this.add(centerSplitPane, BorderLayout.CENTER);
|
this.add(centerSplitPane, BorderLayout.CENTER);
|
||||||
//
|
//
|
||||||
mFrom.setText(Msg.getMsg(Env.getCtx(), "ItemMove"));
|
mFrom.setText(Msg.getMsg(Env.getCtx(), "ItemMove"));
|
||||||
|
@ -249,15 +231,8 @@ public final class VTreePanel extends CPanel
|
||||||
mTo.setActionCommand("To");
|
mTo.setActionCommand("To");
|
||||||
mTo.addActionListener(this);
|
mTo.addActionListener(this);
|
||||||
//
|
//
|
||||||
|
bar.setLayout(new BoxLayout(bar, BoxLayout.Y_AXIS));
|
||||||
bar.setMinimumSize(new Dimension (50,50));
|
bar.setMinimumSize(new Dimension (50,50));
|
||||||
bar.setBorder(new ShadowBorder());
|
|
||||||
bar.setLayout(new FlowLayout());
|
|
||||||
((FlowLayout)bar.getLayout()).setAlignment(FlowLayout.LEFT);
|
|
||||||
bar.add(toolbar);
|
|
||||||
toolbar.setLayout(new GridBagLayout());
|
|
||||||
toolbar.setFloatable(false);
|
|
||||||
toolbar.setRollover(true);
|
|
||||||
toolbar.setBorder(BorderFactory.createEmptyBorder());
|
|
||||||
|
|
||||||
mBarAdd.setText(Msg.getMsg(Env.getCtx(), "BarAdd"));
|
mBarAdd.setText(Msg.getMsg(Env.getCtx(), "BarAdd"));
|
||||||
mBarAdd.setActionCommand("BarAdd");
|
mBarAdd.setActionCommand("BarAdd");
|
||||||
|
@ -276,16 +251,6 @@ public final class VTreePanel extends CPanel
|
||||||
} // jbInit
|
} // jbInit
|
||||||
|
|
||||||
|
|
||||||
private void removeSplitPaneBorder() {
|
|
||||||
if (centerSplitPane != null) {
|
|
||||||
SplitPaneUI splitPaneUI = centerSplitPane.getUI();
|
|
||||||
if (splitPaneUI instanceof BasicSplitPaneUI) {
|
|
||||||
BasicSplitPaneUI basicUI = (BasicSplitPaneUI) splitPaneUI;
|
|
||||||
basicUI.getDivider().setBorder(BorderFactory.createEmptyBorder());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set Divider Location
|
* Set Divider Location
|
||||||
* @param location location (80 default)
|
* @param location location (80 default)
|
||||||
|
@ -874,26 +839,21 @@ public final class VTreePanel extends CPanel
|
||||||
// if (space != -1)
|
// if (space != -1)
|
||||||
// label = label.substring(0, space);
|
// label = label.substring(0, space);
|
||||||
|
|
||||||
CButton button = new CButton(label);
|
CButton button = new CButton(label); // Create the button
|
||||||
button.setOpaque(false);
|
|
||||||
button.setHorizontalAlignment(JButton.LEFT);
|
|
||||||
button.setToolTipText(nd.getDescription());
|
button.setToolTipText(nd.getDescription());
|
||||||
button.setActionCommand(String.valueOf(nd.getNode_ID()));
|
button.setActionCommand(String.valueOf(nd.getNode_ID()));
|
||||||
//
|
//
|
||||||
button.setMargin(new Insets(0, 0, 0, 0));
|
button.setMargin(new Insets(0, 0, 0, 0));
|
||||||
button.setIcon(nd.getIcon());
|
button.setIcon(nd.getIcon());
|
||||||
//button.setBorderPainted(false);
|
button.setBorderPainted(false);
|
||||||
|
// button.setFocusPainted(false);
|
||||||
button.setRequestFocusEnabled(false);
|
button.setRequestFocusEnabled(false);
|
||||||
//
|
//
|
||||||
button.addActionListener(this);
|
button.addActionListener(this);
|
||||||
button.addMouseListener(mouseListener);
|
button.addMouseListener(mouseListener);
|
||||||
//
|
//
|
||||||
toolbar.add(button,
|
bar.add(button);
|
||||||
new GridBagConstraints(0, GridBagConstraints.RELATIVE,
|
|
||||||
1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST,
|
|
||||||
GridBagConstraints.HORIZONTAL, new Insets(1,0,1,0), 4,2));
|
|
||||||
bar.validate();
|
bar.validate();
|
||||||
|
|
||||||
if (centerSplitPane.getDividerLocation() == -1)
|
if (centerSplitPane.getDividerLocation() == -1)
|
||||||
centerSplitPane.setDividerLocation(button.getPreferredSize().width);
|
centerSplitPane.setDividerLocation(button.getPreferredSize().width);
|
||||||
bar.repaint();
|
bar.repaint();
|
||||||
|
@ -904,7 +864,7 @@ public final class VTreePanel extends CPanel
|
||||||
*/
|
*/
|
||||||
private void barRemove()
|
private void barRemove()
|
||||||
{
|
{
|
||||||
toolbar.remove(m_buttonSelected);
|
bar.remove(m_buttonSelected);
|
||||||
bar.validate();
|
bar.validate();
|
||||||
bar.repaint();
|
bar.repaint();
|
||||||
barDBupdate(false, Integer.parseInt(m_buttonSelected.getActionCommand()));
|
barDBupdate(false, Integer.parseInt(m_buttonSelected.getActionCommand()));
|
||||||
|
@ -957,15 +917,6 @@ public final class VTreePanel extends CPanel
|
||||||
}
|
}
|
||||||
} // expandTree
|
} // expandTree
|
||||||
|
|
||||||
@Override
|
|
||||||
public void paint(Graphics g) {
|
|
||||||
if (m_lookAndFeelChanged) {
|
|
||||||
m_lookAndFeelChanged = false;
|
|
||||||
if (m_hasBar) removeSplitPaneBorder();
|
|
||||||
}
|
|
||||||
super.paint(g);
|
|
||||||
}
|
|
||||||
|
|
||||||
} // VTreePanel
|
} // VTreePanel
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -243,8 +243,6 @@ public class MiniTable extends CTable
|
||||||
*/
|
*/
|
||||||
public void addColumn (String header)
|
public void addColumn (String header)
|
||||||
{
|
{
|
||||||
// log.config( "MiniTable.addColumn", header);
|
|
||||||
int index = getColumnCount();
|
|
||||||
if (getModel() instanceof DefaultTableModel)
|
if (getModel() instanceof DefaultTableModel)
|
||||||
{
|
{
|
||||||
DefaultTableModel model = (DefaultTableModel)getModel();
|
DefaultTableModel model = (DefaultTableModel)getModel();
|
||||||
|
@ -312,7 +310,7 @@ public class MiniTable extends CTable
|
||||||
{
|
{
|
||||||
CCheckBox check = new CCheckBox();
|
CCheckBox check = new CCheckBox();
|
||||||
check.setMargin(new Insets(0,0,0,0));
|
check.setMargin(new Insets(0,0,0,0));
|
||||||
check.setHorizontalAlignment(JLabel.CENTER);
|
check.setHorizontalAlignment(SwingConstants.CENTER);
|
||||||
tc.setCellEditor(new DefaultCellEditor(check));
|
tc.setCellEditor(new DefaultCellEditor(check));
|
||||||
}
|
}
|
||||||
m_minWidth.add(new Integer(30));
|
m_minWidth.add(new Integer(30));
|
||||||
|
|
|
@ -118,9 +118,9 @@ public class Request {
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Durchlauf der Parameter Werte. Dabei werden alle <EFBFBD>bergebenen Parameter
|
* Durchlauf der Parameter Werte. Dabei werden alle übergebenen Parameter
|
||||||
* als Columns in der MColumn gesucht und bei einem Treffer diese Werte
|
* als Columns in der MColumn gesucht und bei einem Treffer diese Werte
|
||||||
* dann <EFBFBD>ber set_ValueOfColumn gesetzt
|
* dann über set_ValueOfColumn gesetzt
|
||||||
*/
|
*/
|
||||||
/* MRequest l_newRequest = new MRequest(ctx, 0, l_szTrxName);
|
/* MRequest l_newRequest = new MRequest(ctx, 0, l_szTrxName);
|
||||||
Enumeration l_eParameterNames = request.getParameterNames();
|
Enumeration l_eParameterNames = request.getParameterNames();
|
||||||
|
|
Loading…
Reference in New Issue