當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。