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


Java SoftBevelBorder类代码示例

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


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

示例1: InformationFrame

import javax.swing.border.SoftBevelBorder; //导入依赖的package包/类
public InformationFrame() {
	
	setType(Type.POPUP);
	setResizable(false);
	
	setModalExclusionType(ModalExclusionType.APPLICATION_EXCLUDE);
	this.setTitle("Approving question");
	this.setPreferredSize(new Dimension(350, 170));
	this.setAlwaysOnTop(isAlwaysOnTopSupported());
	this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	getContentPane().setLayout(new BorderLayout());
	
	final Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
	
	this.setLocation(screenSize.width / 2 - 150, screenSize.height / 2 - 75);
	
	this.setIconImage(Toolkit.getDefaultToolkit().getImage(InformationFrame.class.getResource(LOGOPATH)));
	
	final JPanel panel = new JPanel();
	getContentPane().add(panel, BorderLayout.CENTER);
	panel.setLayout(null);
	
	okBtn = new JButton("OK");
	okBtn.setIcon(new ImageIcon(InformationFrame.class.getResource("/com/coder/hms/icons/info_ok.png")));
	okBtn.setFont(new Font("Lucida Grande", Font.PLAIN, 15));
	okBtn.setBorder(new SoftBevelBorder(BevelBorder.RAISED, null, null, null, null));
	okBtn.setBounds(119, 102, 132, 35);
	okBtn.addActionListener(getAction());
	panel.add(okBtn);
	
	lblMessage = new JLabel("");
	lblMessage.setHorizontalTextPosition(SwingConstants.CENTER);
	lblMessage.setHorizontalAlignment(SwingConstants.LEFT);
	lblMessage.setBounds(87, 21, 246, 74);
	panel.add(lblMessage);
	
	lblIcon = new JLabel("");
	lblIcon.setIcon(new ImageIcon(InformationFrame.class.getResource("/com/coder/hms/icons/dialogPane_question.png")));
	lblIcon.setBounds(6, 36, 69, 70);
	panel.add(lblIcon);
	
	this.pack();
}
 
开发者ID:Coder-ACJHP,项目名称:Hotel-Properties-Management-System,代码行数:44,代码来源:InformationFrame.java

示例2: createColorOptions

import javax.swing.border.SoftBevelBorder; //导入依赖的package包/类
/**
 * 
 */
private void createColorOptions() {
	Dimension iconDimension = new Dimension(ToolView.ICON_SIZE + 8, ToolView.ICON_SIZE + 8);
	
	colorLabel = new JLabel(Utils.msg.getString("strokecolor")+":");
	colorField = new JLabel();
	
	colorLabel.setIcon(new ImageIcon(Utils.createIconImage(ToolView.ICON_SIZE, ToolView.ICON_SIZE, "/icons/tools/color1.png")));
	colorLabel.setLabelFor(colorField);
	colorLabel.setFont(defaultTitleFont);
	colorLabel.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
	colorLabel.addMouseListener(new ColorSelectionListener(colorLabel));
	
	colorField.setPreferredSize(iconDimension);
	colorField.setOpaque(true);
	colorField.setBorder(BorderFactory.createCompoundBorder(new LineBorder(new Color(209, 209, 209), 1, true), new SoftBevelBorder(BevelBorder.LOWERED)));
	colorField.setBackground(DEFAULT_COLOR);
	colorField.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
	colorField.setToolTipText(Utils.msg.getString("colorfieldtooltip"));
	colorField.addMouseListener(new ColorSelectionListener(colorField));
}
 
开发者ID:gentunian,项目名称:tellapic,代码行数:24,代码来源:PaintPropertyView.java

示例3: addParameter

import javax.swing.border.SoftBevelBorder; //导入依赖的package包/类
/**
 * Add parameter to this panel.
 * 
 * @param param Parameter to add
 * @param track Parameter tracking object
 */
public void addParameter(Object owner, Parameter<?> param, TrackParameters track) {
  this.setBorder(new SoftBevelBorder(SoftBevelBorder.LOWERED));
  ParameterConfigurator cfg = null;
  { // Find
    Object cur = owner;
    while(cur != null) {
      cfg = childconfig.get(cur);
      if(cfg != null) {
        break;
      }
      cur = track.getParent(cur);
    }
  }
  if(cfg != null) {
    cfg.addParameter(owner, param, track);
    return;
  }
  else {
    cfg = makeConfigurator(param);
    cfg.addChangeListener(this);
    children.add(cfg);
  }
}
 
开发者ID:elki-project,项目名称:elki,代码行数:30,代码来源:ConfiguratorPanel.java

示例4: CaptureMic

import javax.swing.border.SoftBevelBorder; //导入依赖的package包/类
public CaptureMic() {
    setLayout(new BorderLayout());
    EmptyBorder eb = new EmptyBorder(5, 5, 5, 5);
    SoftBevelBorder sbb = new SoftBevelBorder(SoftBevelBorder.LOWERED);
    setBorder(new EmptyBorder(5, 5, 5, 5));
 
    JPanel p1 = new JPanel();
    p1.setLayout(new BoxLayout(p1, BoxLayout.X_AXIS));
 
    JPanel p2 = new JPanel();
    p2.setBorder(sbb);
    p2.setLayout(new BoxLayout(p2, BoxLayout.Y_AXIS));
 
    JPanel buttonsPanel = new JPanel();
    buttonsPanel.setBorder(new EmptyBorder(10, 0, 5, 0));
    playB = addButton("Play", buttonsPanel, false);
    captB = addButton("Record", buttonsPanel, true);
    p2.add(buttonsPanel);
 
    p1.add(p2);
    add(p1);
}
 
开发者ID:richardgrimmett,项目名称:Strikeometer,代码行数:23,代码来源:CaptureMic.java

示例5: createPropertyDescriptors

import javax.swing.border.SoftBevelBorder; //导入依赖的package包/类
@Override
protected PropertyDescriptor[] createPropertyDescriptors() throws IntrospectionException {
    PropertyDescriptor[] pds = new PropertyDescriptor[] {
        createRO(SoftBevelBorder.class, "bevelType"), // NOI18N
        createRO(SoftBevelBorder.class, "highlightOuterColor"), // NOI18N
        createRO(SoftBevelBorder.class, "highlightInnerColor"), // NOI18N
        createRO(SoftBevelBorder.class, "shadowOuterColor"), // NOI18N
        createRO(SoftBevelBorder.class, "shadowInnerColor"), // NOI18N
    };
    pds[0].setPropertyEditorClass(BevelBorderBeanInfo.BevelTypePropertyEditor.class);
    return pds;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:13,代码来源:SoftBevelBorderBeanInfo.java

示例6: setType

import javax.swing.border.SoftBevelBorder; //导入依赖的package包/类
private void setType() {
    int locationPoint = 323;
    for (int i = 0; i < 3; i++) {

        roomTypes = new JTextField();
        roomTypes.setColumns(10);
        roomTypes.setBorder(new SoftBevelBorder(BevelBorder.LOWERED, null, null, null, null));
        roomTypes.setBounds(locationPoint, 97, 86, 20);
        roomTypes.setVisible(false);
        bottomPanel.add(roomTypes);

        roomTypeFields[i] = roomTypes;
        locationPoint = locationPoint + 96;
    }
}
 
开发者ID:Coder-ACJHP,项目名称:Hotel-Properties-Management-System,代码行数:16,代码来源:HotelPropertiesWindow.java

示例7: LicenseWindow

import javax.swing.border.SoftBevelBorder; //导入依赖的package包/类
/**
 * Create the frame.
 */
public LicenseWindow(final String path) {
	
	setTitle("Coder HPMSA - [License]");
	setBounds(100, 100, 550, 550);
	setBackground(Color.decode("#066d95"));
	setLocationRelativeTo(null);
	setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
	
	this.setIconImage(Toolkit.getDefaultToolkit().
			getImage(getClass().getResource(LOGOPATH)));
	
	final JScrollPane scrollPane = new JScrollPane();
	scrollPane.setBorder(new SoftBevelBorder(BevelBorder.LOWERED, null, null, null, null));
	getContentPane().add(scrollPane, BorderLayout.CENTER);
	
	editorPane = new JTextPane();
	editorPane.setBackground(new Color(255, 255, 240));
	editorPane.setFont(new Font("Verdana", Font.PLAIN, 13));
	editorPane.setBorder(new EtchedBorder(EtchedBorder.RAISED, null, null));
	editorPane.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);
	editorPane.setEditable(false);
	scrollPane.setViewportView(editorPane);
	
	final StyledDocument doc = editorPane.getStyledDocument();
	final SimpleAttributeSet center = new SimpleAttributeSet();
	StyleConstants.setAlignment(center, StyleConstants.ALIGN_CENTER);
	doc.setParagraphAttributes(0, doc.getLength()-1, center, false);
	
	fillEditorPane(path);
	setVisible(true);
}
 
开发者ID:Coder-ACJHP,项目名称:Hotel-Properties-Management-System,代码行数:35,代码来源:LicenseWindow.java

示例8: createProgressPanel

import javax.swing.border.SoftBevelBorder; //导入依赖的package包/类
private void createProgressPanel() {
    setLayout(new BorderLayout());

    JPanel textWrapper = new JPanel(new BorderLayout());
    textWrapper.setBorder(new SoftBevelBorder(BevelBorder.LOWERED));
    textWrapper.setAlignmentX(LEFT_ALIGNMENT);
    progressTextArea = new MyTextArea();

    progressTextArea.getAccessibleContext().setAccessibleName(
            resourceManager.getString("ProgressBarDemo.accessible_text_area_name"));
    progressTextArea.getAccessibleContext().setAccessibleDescription(
            resourceManager.getString("ProgressBarDemo.accessible_text_area_description"));
    textWrapper.add(new JScrollPane(progressTextArea), BorderLayout.CENTER);

    add(textWrapper, BorderLayout.CENTER);

    JPanel progressPanel = new JPanel();
    add(progressPanel, BorderLayout.SOUTH);

    progressBar = new JProgressBar(JProgressBar.HORIZONTAL, 0, text.length()) {
        @Override
        public Dimension getPreferredSize() {
            return new Dimension(300, super.getPreferredSize().height);
        }
    };
    progressBar.getAccessibleContext().setAccessibleName(
            resourceManager.getString("ProgressBarDemo.accessible_text_loading_progress"));

    progressPanel.add(progressBar);
    progressPanel.add(createLoadButton());
    progressPanel.add(createStopButton());
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:33,代码来源:ProgressBarDemo.java

示例9: createProgressPanel

import javax.swing.border.SoftBevelBorder; //导入依赖的package包/类
private void createProgressPanel() {
    setLayout(new BorderLayout());

    JPanel textWrapper = new JPanel(new BorderLayout());
    textWrapper.setBorder(new SoftBevelBorder(BevelBorder.LOWERED));
    textWrapper.setAlignmentX(LEFT_ALIGNMENT);
    progressTextArea = new MyTextArea();

    progressTextArea.getAccessibleContext().setAccessibleName(
            resourceManager.getString("ProgressBarDemo.accessible_text_area_name"));
    progressTextArea.getAccessibleContext().setAccessibleName(
            resourceManager.getString("ProgressBarDemo.accessible_text_area_description"));
    textWrapper.add(new JScrollPane(progressTextArea), BorderLayout.CENTER);

    add(textWrapper, BorderLayout.CENTER);

    JPanel progressPanel = new JPanel();
    add(progressPanel, BorderLayout.SOUTH);

    progressBar = new JProgressBar(JProgressBar.HORIZONTAL, 0, text.length()) {
        public Dimension getPreferredSize() {
            return new Dimension(300, super.getPreferredSize().height);
        }
    };
    progressBar.getAccessibleContext().setAccessibleName(
            resourceManager.getString("ProgressBarDemo.accessible_text_loading_progress"));

    progressPanel.add(progressBar);
    progressPanel.add(createLoadButton());
    progressPanel.add(createStopButton());
}
 
开发者ID:freeseawind,项目名称:littleluck,代码行数:32,代码来源:ProgressBarDemo.java

示例10: JSoundCapture

import javax.swing.border.SoftBevelBorder; //导入依赖的package包/类
/**
 * Instantiates a new j sound capture.
 * 
 * @param isDrawingRequired
 *            the is drawing required
 * @param isSaveRequired
 *            the is save required
 */
public JSoundCapture(boolean isDrawingRequired, boolean isSaveRequired) {
	wd = new WaveData();
	this.isDrawingRequired = isDrawingRequired;
	this.isSaveRequired = isSaveRequired;
	setLayout(new BorderLayout());
	setBorder(new EmptyBorder(1, 1, 1, 1));

	innerPanel = new JPanel();
	innerPanel.setLayout(new BoxLayout(innerPanel, BoxLayout.X_AXIS));

	JPanel buttonsPanel = new JPanel();
	buttonsPanel.setPreferredSize(new Dimension(200, 50));
	buttonsPanel.setBorder(new EmptyBorder(5, 0, 1, 0));
	playB = addButton("Play", buttonsPanel, false);
	captB = addButton("Record", buttonsPanel, true);
	pausB = addButton("Pause", buttonsPanel, false);
	saveB = addButton("Save ", buttonsPanel, false);
	innerPanel.add(buttonsPanel);

	// samplingPanel
	if (isDrawingRequired) {
		JPanel samplingPanel = new JPanel(new BorderLayout());
		EmptyBorder eb = new EmptyBorder(2, 2, 2, 2);
		SoftBevelBorder sbb = new SoftBevelBorder(SoftBevelBorder.LOWERED);
		samplingPanel.setBorder(new CompoundBorder(eb, sbb));
		samplingPanel.add(samplingGraph = new SamplingGraph());
		innerPanel.add(samplingPanel);
	}
	// whole panel
	JPanel completePanel = new JPanel();
	completePanel.setLayout(new BoxLayout(completePanel, BoxLayout.X_AXIS));
	completePanel.add(innerPanel);
	add(completePanel);
}
 
开发者ID:KangCai,项目名称:AudioProcessingBox,代码行数:43,代码来源:JSoundCapture.java

示例11: FileList

import javax.swing.border.SoftBevelBorder; //导入依赖的package包/类
public FileList(final Path path, final DefaultListModel<Path> listModel) {
    super(listModel);
    this.listModel = listModel;
    this.path = path;

    this.setBorder(new SoftBevelBorder(BevelBorder.LOWERED));
    this.setBackground(Color.WHITE);

    this.

    buildList();
}
 
开发者ID:adamIqbal,项目名称:Health,代码行数:13,代码来源:XmlFilePanel.java

示例12: addDisplayImage

import javax.swing.border.SoftBevelBorder; //导入依赖的package包/类
private void addDisplayImage(String baseDir, String fileName, String densityPrefix, List<String> densityList) {
    if (densityList == null || densityList.size() == 0) {
        return;
    }

    Component oldComponent = null;

    for (String density : densityList) {
        JPanel panel = new JPanel();
        panel.setLayout(new BorderLayout());

        // Label
        JLabel densityLabel = new JLabel();
        densityLabel.setText(density);
        densityLabel.setHorizontalAlignment(JLabel.CENTER);
        densityLabel.setBorder(new EmptyBorder(0, 0, 4, 0));

        // Image
        JLabel iconLabel = new JLabel();
        String filePath = baseDir + Constants.PATH_SEPARATOR +
                densityPrefix + density + Constants.PATH_SEPARATOR + fileName;
        Icon icon = IconUtils.createOriginalIcon(filePath);
        iconLabel.setIcon(icon);
        iconLabel.setBorder(new SoftBevelBorder(SoftBevelBorder.LOWERED));

        panel.add(densityLabel, BorderLayout.PAGE_START);
        panel.add(iconLabel, BorderLayout.CENTER);

        String e2 = oldComponent == null ? SpringLayout.WEST : SpringLayout.EAST;
        Component c2 = oldComponent == null ? mainPanel : oldComponent;
        layout.putConstraint(SpringLayout.NORTH, panel, 8, SpringLayout.NORTH, mainPanel);
        layout.putConstraint(SpringLayout.WEST, panel, 16, e2, c2);
        mainPanel.add(panel);

        oldComponent = panel;
    }
}
 
开发者ID:androhi,项目名称:AndroidDrawableViewer,代码行数:38,代码来源:DetailDisplayDialog.java

示例13: StatusBar

import javax.swing.border.SoftBevelBorder; //导入依赖的package包/类
/**
 * Default constructor.
 */
public StatusBar()
{
  // Set the GUI elements of the panel
  setLayout(new BorderLayout(20, 0));
  setForeground(Color.black);
  setBorder(new CompoundBorder(new EmptyBorder(2, 2, 2, 2),
                               new SoftBevelBorder(SoftBevelBorder.LOWERED)));
  
  // Create and add the two label fields
  label1 = new JLabel("Ready", SwingConstants.LEFT);
  label2 = new JLabel("", SwingConstants.RIGHT);
  add(label1, BorderLayout.CENTER);
  add(label2, BorderLayout.EAST);
}
 
开发者ID:argonium,项目名称:jarman,代码行数:18,代码来源:StatusBar.java

示例14: getPanelInferior

import javax.swing.border.SoftBevelBorder; //导入依赖的package包/类
public JPanel getPanelInferior() {
	if (panelInferior == null) {
		panelInferior = new JPanel();
		panelInferior.setBorder(new SoftBevelBorder(BevelBorder.LOWERED, null, null, null, null));
		panelInferior.setLayout(new GridLayout(0, 1, 0, 0));
		panelInferior.add(getPanelPregunta());
		panelInferior.add(getPanelRespuesta());
	}
	return panelInferior;
}
 
开发者ID:ander94lakx,项目名称:Pasapalabra,代码行数:11,代码来源:Juego.java

示例15: getPanelPuntuacion

import javax.swing.border.SoftBevelBorder; //导入依赖的package包/类
public JPanel getPanelPuntuacion() {
	if (panelPuntuacion == null) {
		panelPuntuacion = new JPanel();
		panelPuntuacion.setBorder(new SoftBevelBorder(BevelBorder.LOWERED, null, null, null, null));
		panelPuntuacion.setLayout(new GridLayout(3, 1, 0, 0));
		panelPuntuacion.add(getAciertos());
		panelPuntuacion.add(getFallos());
		panelPuntuacion.add(getPanelTiempo());
	}
	return panelPuntuacion;
}
 
开发者ID:ander94lakx,项目名称:Pasapalabra,代码行数:12,代码来源:Juego.java


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