当前位置: 首页>>代码示例>>Java>>正文


Java BasicArrowButton类代码示例

本文整理汇总了Java中javax.swing.plaf.basic.BasicArrowButton的典型用法代码示例。如果您正苦于以下问题:Java BasicArrowButton类的具体用法?Java BasicArrowButton怎么用?Java BasicArrowButton使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


BasicArrowButton类属于javax.swing.plaf.basic包,在下文中一共展示了BasicArrowButton类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createArrowButton

import javax.swing.plaf.basic.BasicArrowButton; //导入依赖的package包/类
/**
 * <pre>
 * 重写下拉按钮,增加焦点颜色
 *
 * Rewrite the drop-down button to increase the focus color
 * </pre>
 *
 * @return arrow button info
 */
protected JButton createArrowButton()
{
    JButton button = new LuckComboBoxButton(BasicArrowButton.SOUTH)
    {
        private static final long serialVersionUID = -7259590635997077859L;

        @Override
        public LuckBorderField getBorderField()
        {
            return LuckComboBoxUI.this;
        }

        @Override
        public JComponent getParentComp()
        {
            return LuckComboBoxUI.this.comboBox;
        }
    };

    button.setName("ComboBox.arrowButton");

    return button;
}
 
开发者ID:freeseawind,项目名称:littleluck,代码行数:33,代码来源:LuckComboBoxUI.java

示例2: DatePicker

import javax.swing.plaf.basic.BasicArrowButton; //导入依赖的package包/类
public DatePicker(Date date) {
    selectedDay = null;
    selectedDate = null;
    originalDate = null;
    backButton = new BasicArrowButton(BasicArrowButton.WEST);//new JButton();
    monthAndYear = new JLabel();
    forwardButton = new BasicArrowButton(BasicArrowButton.EAST);//new JButton();
    todayButton = new JButton();
    cancelButton = new JButton();
    if (date == null) {
        selectedDate = getToday();
    } else {
        selectedDate = new GregorianCalendar();
        selectedDate.setTime(date);
    }
    originalDate = new GregorianCalendar(selectedDate.get(Calendar.YEAR), selectedDate.get(Calendar.MONTH), selectedDate.get(Calendar.DAY_OF_MONTH));
    init();
}
 
开发者ID:Torridity,项目名称:dsworkbench,代码行数:19,代码来源:DatePicker.java

示例3: JDropDownButton

import javax.swing.plaf.basic.BasicArrowButton; //导入依赖的package包/类
public JDropDownButton(String text) {
	super(text);
	buttonPopupMenu = new JPopupMenu();
	arrowButton = new BasicArrowButton(SwingConstants.SOUTH, null, null, Color.BLACK, null);
	arrowButton.setBorder(BorderFactory.createEmptyBorder());
	arrowButton.setFocusable(false);
	setHorizontalAlignment(SwingConstants.LEFT);
	setLayout(new BorderLayout());
	add(arrowButton, BorderLayout.EAST);
	arrowButton.addActionListener(new ActionListener() {
		public void actionPerformed(ActionEvent e) {
			Rectangle r = getBounds();
			buttonPopupMenu.show(JDropDownButton.this, r.x, r.y + r.height);
		}
	});
}
 
开发者ID:bh4017,项目名称:mobac,代码行数:17,代码来源:JDropDownButton.java

示例4: ArrowColumn

import javax.swing.plaf.basic.BasicArrowButton; //导入依赖的package包/类
/**
 * Instantiates a new arrow column.
 *
 * @param table the table
 * @param column the column
 * @param direction the direction
 */
public ArrowColumn(JTable table, int column, int direction){
	super(table, column);
	renderButton = new BasicArrowButton(direction);
	editButton = new BasicArrowButton(direction);
	editButton.setText("arrow");
	setButtons(renderButton, editButton);
}
 
开发者ID:spatialsimulator,项目名称:XitoSBML,代码行数:15,代码来源:ArrowColumn.java

示例5: ImageTable

import javax.swing.plaf.basic.BasicArrowButton; //导入依赖的package包/类
/**
 * Instantiates a new image table.
 */
public ImageTable() {
	super();

	Object[][] data = new Object[defaultDomtype.length][columnNames.length];
	for (int i = 0; i < defaultDomtype.length; i++) {
		data[i][0] = defaultDomtype[i];
	}

	// table
	tableModel = new MyTableModel(data, columnNames);

	setModel(tableModel);
	setBackground(new Color(169,169,169));
	getTableHeader().setReorderingAllowed(false);

	// mouse
	addMouseListener(this);
	setCellSelectionEnabled(true);

	new ArrowColumn(this, colUpButton, BasicArrowButton.NORTH);
	new ArrowColumn(this, colDownButton, BasicArrowButton.SOUTH);
	new AddingColumn(this, colAddImage);

	TableColumn column = (TableColumn) this.getColumnModel().getColumn(colAddImage);
	column.setMaxWidth(50);
	column = (TableColumn) getColumnModel().getColumn(colDownButton);
	column.setMaxWidth(50);
	column = (TableColumn) getColumnModel().getColumn(colUpButton);
	column.setMaxWidth(50);
	setVisible(true);
}
 
开发者ID:spatialsimulator,项目名称:XitoSBML,代码行数:35,代码来源:ImageTable.java

示例6: getColumnClass

import javax.swing.plaf.basic.BasicArrowButton; //导入依赖的package包/类
@Override
public Class<?> getColumnClass(int Column) {
	switch (Column) {
	case 0:
	case 1:
		return String.class;
	case 2:
		return JButton.class;
	case 3:
	case 4:
		return BasicArrowButton.class;
	default:
		return Boolean.class;
	}
}
 
开发者ID:spatialsimulator,项目名称:XitoSBML,代码行数:16,代码来源:ImageTable.java

示例7: createDecreaseButton

import javax.swing.plaf.basic.BasicArrowButton; //导入依赖的package包/类
@Override
protected JButton createDecreaseButton(int orientation) {
	BasicArrowButton button = new BasicArrowButton(orientation,
			UIManager.getColor("ScrollBar.thumb"),
			UIManager.getColor("ScrollBar.thumbShadow"),
			Color.WHITE,
			UIManager.getColor("ScrollBar.thumbHighlight"));
	button.setBackground(GUI.COLOR_UI_ELEMENT);
	button.setForeground(Color.WHITE);
	return button;
}
 
开发者ID:Forlini91,项目名称:Empire-Earth---DB-Editor,代码行数:12,代码来源:EEScrollBarUI.java

示例8: createIncreaseButton

import javax.swing.plaf.basic.BasicArrowButton; //导入依赖的package包/类
@Override
protected JButton createIncreaseButton(int orientation) {
	JButton button = new BasicArrowButton(orientation,
			UIManager.getColor("ScrollBar.thumb"),
			UIManager.getColor("ScrollBar.thumbShadow"),
			Color.WHITE,
			UIManager.getColor("ScrollBar.thumbHighlight"));
	button.setBackground(GUI.COLOR_UI_ELEMENT);
	button.setForeground(Color.WHITE);
	return button;
}
 
开发者ID:Forlini91,项目名称:Empire-Earth---DB-Editor,代码行数:12,代码来源:EEScrollBarUI.java

示例9: ArrowIcon

import javax.swing.plaf.basic.BasicArrowButton; //导入依赖的package包/类
/**
 * Instantiates a new arrow icon.
 *
 * @param iconSize the icon size
 * @param direction the direction
 * @param isEnabled the is enabled
 */
public ArrowIcon(int iconSize, int direction, boolean isEnabled) {
    this.size = iconSize / 2;
    this.iconSize = iconSize;
    this.direction = direction;
    this.isEnabled = isEnabled;
    iconRenderer = new BasicArrowButton(direction);
}
 
开发者ID:robward-scisys,项目名称:sldeditor,代码行数:15,代码来源:ArrowIcon.java

示例10: createArrowButton

import javax.swing.plaf.basic.BasicArrowButton; //导入依赖的package包/类
@Override 
protected JButton createArrowButton() {
    return new MyBasicArrowButton(
            BasicArrowButton.SOUTH,
            basicArrowButton_Background, //UIManager.getColor("ScrollBar.thumb"),             //Background
            basicArrowButton_Background, //UIManager.getColor("ScrollBar.thumbShadow"),
            basicArrowButton_Foreground, //UIManager.getColor("ScrollBar.thumbDarkShadow"),   //Rand unten Rechts , Pfeilfarbe
            basicArrowButton_Background); //UIManager.getColor("ScrollBar.thumbHighlight"));   
}
 
开发者ID:R3d-Dragon,项目名称:jMovieManager,代码行数:10,代码来源:MyBasicComboBoxUI.java

示例11: ArrowIcon

import javax.swing.plaf.basic.BasicArrowButton; //导入依赖的package包/类
public ArrowIcon(int iconSize, int direction, boolean isEnabled)
{
    this.size = iconSize / 2;
    this.iconSize = iconSize;
    this.direction = direction;
    this.isEnabled = isEnabled;
    iconRenderer = new BasicArrowButton(direction);
}
 
开发者ID:GlitchCog,项目名称:ChatGameFontificator,代码行数:9,代码来源:ArrowIcon.java

示例12: createArrowButton

import javax.swing.plaf.basic.BasicArrowButton; //导入依赖的package包/类
@Override
protected JButton createArrowButton() {
	final JButton button = new BasicArrowButton(SwingConstants.SOUTH, WidgetColors.COLOR_ENCLOSURE_BG,
			WidgetColors.COLOR_ENCLOSURE_BG, WidgetColors.COLOR_LIST_FG, WidgetColors.COLOR_ENCLOSURE_BG);
	button.setName("ComboBox.arrowButton");
	return button;
}
 
开发者ID:processmining,项目名称:synthetic-log-generator,代码行数:8,代码来源:ProMComboBoxUI.java

示例13: isSupportedBy

import javax.swing.plaf.basic.BasicArrowButton; //导入依赖的package包/类
@Override
public boolean isSupportedBy(ComponentModel model) {

  // skip fileChooser dialog.
  WindowModel winModel = GUIModelExtractor.getWindowModel(model);
  if (winModel != null && winModel.get("windowlisteners") != null
      && winModel.get("windowlisteners").indexOf("javax.swing.JFileChooser") >= 0) {
    return false;
  }

  AccessibleAction aAction = JFCUtil.getAccessibleContext(model).getAccessibleAction();
  Accessible accessibleObj = (Accessible) model.getRef();
  if (aAction == null)
    return false;

  if (aAction.getAccessibleActionCount() == 0)
    return false;
  if (accessibleObj instanceof JMenuItem) {
    return false; // should be handled by SelectionMenuEvent
  }
  if (accessibleObj instanceof JTextComponent) {
    return false; // should be handled by EditableTextEvent
  }
  if (accessibleObj instanceof BasicArrowButton) {
    return false; // should be handled by ValueEvnet
  }
  if (accessibleObj instanceof JComboBox) {
    return false; // should be handled by SelectionEvent
  }
  if (accessibleObj instanceof JSpinner) {
    return false; // should be handled by SelectionEvent
  }

  return true;

}
 
开发者ID:gigony,项目名称:GUITester-core,代码行数:37,代码来源:ActionableEvent_JFC.java

示例14: findTargetBtnComponent

import javax.swing.plaf.basic.BasicArrowButton; //导入依赖的package包/类
private ComponentModel findTargetBtnComponent(GUIModel root) {

    for (Enumeration<GUIModel> enumuration = (Enumeration<GUIModel>) root.depthFirstEnumeration(); enumuration
        .hasMoreElements();) {
      GUIModel node = enumuration.nextElement();
      Object userObj = node.getUserObject();
      if (userObj instanceof ComponentModel) {
        ComponentModel model = (ComponentModel) userObj;

        AccessibleAction aAction = JFCUtil.getAccessibleContext(model).getAccessibleAction();
        Accessible accessibleObj = (Accessible) model.getRef();
        if (aAction == null)
          continue;

        if (aAction.getAccessibleActionCount() == 0)
          continue;
        if (accessibleObj instanceof JMenuItem) {
          continue; // should be handled by SelectionMenuEvent
        }
        if (accessibleObj instanceof JTextComponent) {
          continue; // should be handled by EditableTextEvent
        }
        if (accessibleObj instanceof BasicArrowButton) {
          continue; // should be handled by ValueEvnet
        }
        if (accessibleObj instanceof JComboBox) {
          continue; // should be handled by SelectionEvent
        }
        if (accessibleObj instanceof JSpinner) {
          continue; // should be handled by SelectionEvent
        }

        String title = model.get("title");
        if (title.equalsIgnoreCase(targetBtnName)) {
          return model;
        }
      }
    }
    return null;
  }
 
开发者ID:gigony,项目名称:GUITester-core,代码行数:41,代码来源:FileChooserDialogEvent_JFC.java

示例15: createArrowButton

import javax.swing.plaf.basic.BasicArrowButton; //导入依赖的package包/类
@Override
protected JButton createArrowButton() {
  final Color bg = myComboBox.getBackground();
  final Color fg = myComboBox.getForeground();
  JButton button = new BasicArrowButton(SwingConstants.SOUTH, bg, fg, fg, fg) {

    @Override
    public void paint(Graphics g) {
      Color borderColor = ModernUIUtil.getBorderColor(myComboBox);
      GraphicsConfig config = new GraphicsConfig(g);

      final int w = getWidth();
      final int h = getHeight();
      g.setColor(UIUtil.getControlColor());
      g.fillRect(0, 0, w, h);
      g.setColor(myComboBox.isEnabled() ? getForeground() : borderColor);
      GraphicsUtil.setupAAPainting(g);
      g.drawLine(JBUI.scale(3), JBUI.scale(7), JBUI.scale(7), JBUI.scale(11));
      g.drawLine(JBUI.scale(7), JBUI.scale(11), JBUI.scale(11), JBUI.scale(7));
      config.restore();
    }

    @Override
    public Dimension getPreferredSize() {
      int size = getFont().getSize() + JBUI.scale(4);
      if (size % 2 == 1) size += JBUI.scale(1);
      return new DimensionUIResource(size, size);
    }
  };
  button.setBorder(BorderFactory.createEmptyBorder());
  button.setOpaque(false);
  return button;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:34,代码来源:ModernComboBoxUI.java


注:本文中的javax.swing.plaf.basic.BasicArrowButton类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。