⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 objselectionpanel.java

📁 全球著名IT公司ILog的APS高级排产优化引擎
💻 JAVA
字号:
package com.power.pipeengine.EngineUI;/** * <p>Title: PIPE Engine</p> * <p>Description: Global Planning Optimization Engine</p> * <p>Copyright: Copyright (c) 2002</p> * <p>Company: Paraster, Inc.</p> * @author Wei Tan * @version 1.0 */import java.awt.*;import javax.swing.*;import java.awt.event.*;import com.power.pipeengine.*;import java.util.ResourceBundle;/** * ObjectiveValue is a one line JPanel that displays current iteration number * and objective value from the LP engine. It has a label and a field for the * iteration and objective value. * It is a singular class. */public class ObjSelectionPanel extends JPanel {  static ResourceBundle res = ResourceBundle.getBundle("com.power.pipeengine.Res",                                                          EngineConfig.getInstance().getLocale() );  private JLabel _selectionLabel = new JLabel( res.getString("Choose_an_objective") );  private String[] _objFunctions = { res.getString("MAXIMIZE_ON_TIME"), res.getString("_disabled_MAXIMIZE") };  private JComboBox _selectionComboBox = new JComboBox( _objFunctions );  private static final ObjSelectionPanel INSTANCE =                              new ObjSelectionPanel();  /**   * class constructor   */  private ObjSelectionPanel() {    init();  }  /**   * Gets the global instance of the singular class object.   * @return the global instance.   */  public static ObjSelectionPanel getInstance( ) {        return INSTANCE;  }  //initialize the class  private void init() {    _selectionComboBox.setSelectedIndex( 0 ); //show "MAXIMIZE ON-TIME DELIVERY"    _selectionComboBox.setEditable( false );    _selectionComboBox.setEnabled( true );    _selectionComboBox.setToolTipText( res.getString("Choose_an_objective1") );    _selectionComboBox.addActionListener(  new ActionListener() {			public void actionPerformed( ActionEvent e ) {                _selectionComboBox.setSelectedIndex( 0 );                String selection = (String) _selectionComboBox.getSelectedItem();				EngineConfig.getInstance().setObjType( selection );			}    });    this.setLayout( new FlowLayout() );    //this.add( _selectionLabel );    this.setToolTipText( res.getString("Choose_an_objective1") );    this.setBorder( BorderFactory.createTitledBorder( res.getString("Objective_to_optimize") ));    this.add( _selectionComboBox );  }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -