Adempiere 3.1.2

This commit is contained in:
vpj-cd 2006-12-07 04:43:01 +00:00
parent 7dd562c52d
commit 297d3015fb
4 changed files with 2289 additions and 2340 deletions

View File

@ -438,7 +438,7 @@ class AcctViewerData
rm.addColumn(new RColumn(ctx, "Description", DisplayType.String));
}
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));
return rm;
} // createRModel

View File

@ -56,8 +56,6 @@ import org.compiere.util.*;
public final class VTreePanel extends CPanel
implements ActionListener, DragGestureListener, DragSourceListener, DropTargetListener
{
protected boolean m_lookAndFeelChanged = false;
/**
* Tree Panel for browsing and editing of a tree.
* Need to call initTree
@ -82,16 +80,8 @@ public final class VTreePanel extends CPanel
centerSplitPane.setDividerSize(0);
popMenuTree.remove(mBarAdd);
}
else {
else
centerSplitPane.setDividerLocation(80);
UIManager.addPropertyChangeListener(new PropertyChangeListener() {
public void propertyChange(PropertyChangeEvent evt) {
if ("lookAndFeel".equals(evt.getPropertyName()))
m_lookAndFeelChanged = true;
}
});
}
// base settings
if (editable)
tree.setDropTarget(dropTarget);
@ -125,7 +115,7 @@ public final class VTreePanel extends CPanel
// Shortcut Bar
if (m_hasBar)
{
toolbar.removeAll(); // remove all existing buttons
bar.removeAll(); // remove all existing buttons
Enumeration en = m_root.preorderEnumeration();
while (en.hasMoreElements())
{
@ -154,7 +144,6 @@ public final class VTreePanel extends CPanel
private CMenuItem mFrom = new CMenuItem();
private CMenuItem mTo = new CMenuItem();
private CPanel bar = new CPanel();
private JToolBar toolbar = new JToolBar(JToolBar.VERTICAL);
private CMenuItem mBarAdd = new CMenuItem();
private CMenuItem mBarRemove = new CMenuItem();
private BorderLayout southLayout = new BorderLayout();
@ -210,8 +199,6 @@ public final class VTreePanel extends CPanel
tree.addKeyListener(keyListener);
tree.setCellRenderer(new VTreeCellRenderer());
treePane.getViewport().add(tree, null);
treePane.setBorder(new ShadowBorder());
tree.setBorder(BorderFactory.createEmptyBorder());
// treePane.setPreferredSize(new Dimension(50,200));
// tree.setPreferredSize(new Dimension(100,150));
//
@ -232,13 +219,8 @@ public final class VTreePanel extends CPanel
southPanel.add(treeSearch, BorderLayout.EAST);
this.add(southPanel, BorderLayout.SOUTH);
//
centerSplitPane.setOpaque(false);
toolbar.setOpaque(false);
centerSplitPane.add(treePane, JSplitPane.RIGHT);
centerSplitPane.add(bar, JSplitPane.LEFT);
centerSplitPane.setBorder(BorderFactory.createEmptyBorder());
removeSplitPaneBorder();
this.add(centerSplitPane, BorderLayout.CENTER);
//
mFrom.setText(Msg.getMsg(Env.getCtx(), "ItemMove"));
@ -249,15 +231,8 @@ public final class VTreePanel extends CPanel
mTo.setActionCommand("To");
mTo.addActionListener(this);
//
bar.setLayout(new BoxLayout(bar, BoxLayout.Y_AXIS));
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.setActionCommand("BarAdd");
@ -276,16 +251,6 @@ public final class VTreePanel extends CPanel
} // 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
* @param location location (80 default)
@ -874,26 +839,21 @@ public final class VTreePanel extends CPanel
// if (space != -1)
// label = label.substring(0, space);
CButton button = new CButton(label);
button.setOpaque(false);
button.setHorizontalAlignment(JButton.LEFT);
CButton button = new CButton(label); // Create the button
button.setToolTipText(nd.getDescription());
button.setActionCommand(String.valueOf(nd.getNode_ID()));
//
button.setMargin(new Insets(0, 0, 0, 0));
button.setIcon(nd.getIcon());
//button.setBorderPainted(false);
button.setBorderPainted(false);
// button.setFocusPainted(false);
button.setRequestFocusEnabled(false);
//
button.addActionListener(this);
button.addMouseListener(mouseListener);
//
toolbar.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.add(button);
bar.validate();
if (centerSplitPane.getDividerLocation() == -1)
centerSplitPane.setDividerLocation(button.getPreferredSize().width);
bar.repaint();
@ -904,7 +864,7 @@ public final class VTreePanel extends CPanel
*/
private void barRemove()
{
toolbar.remove(m_buttonSelected);
bar.remove(m_buttonSelected);
bar.validate();
bar.repaint();
barDBupdate(false, Integer.parseInt(m_buttonSelected.getActionCommand()));
@ -957,15 +917,6 @@ public final class VTreePanel extends CPanel
}
} // expandTree
@Override
public void paint(Graphics g) {
if (m_lookAndFeelChanged) {
m_lookAndFeelChanged = false;
if (m_hasBar) removeSplitPaneBorder();
}
super.paint(g);
}
} // VTreePanel

View File

@ -243,8 +243,6 @@ public class MiniTable extends CTable
*/
public void addColumn (String header)
{
// log.config( "MiniTable.addColumn", header);
int index = getColumnCount();
if (getModel() instanceof DefaultTableModel)
{
DefaultTableModel model = (DefaultTableModel)getModel();
@ -312,7 +310,7 @@ public class MiniTable extends CTable
{
CCheckBox check = new CCheckBox();
check.setMargin(new Insets(0,0,0,0));
check.setHorizontalAlignment(JLabel.CENTER);
check.setHorizontalAlignment(SwingConstants.CENTER);
tc.setCellEditor(new DefaultCellEditor(check));
}
m_minWidth.add(new Integer(30));

View File

@ -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
* dann <EFBFBD>ber set_ValueOfColumn gesetzt
* dann über set_ValueOfColumn gesetzt
*/
/* MRequest l_newRequest = new MRequest(ctx, 0, l_szTrxName);
Enumeration l_eParameterNames = request.getParameterNames();