javax.swing.JButton#setRequestFocusEnabled ( )源码实例Demo

下面列出了javax.swing.JButton#setRequestFocusEnabled ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: jaamsim   文件: GUIFrame.java
private void addCopyButton(JToolBar buttonBar, Insets margin) {
	copyButton = new JButton(new ImageIcon(GUIFrame.class.getResource("/resources/images/Copy-16.png")));
	copyButton.setToolTipText(formatToolTip("Copy (Ctrl+C)",
			"Copies the selected entity to the clipboard."));
	copyButton.setMargin(margin);
	copyButton.setFocusPainted(false);
	copyButton.setRequestFocusEnabled(false);
	copyButton.addActionListener(new ActionListener() {
		@Override
		public void actionPerformed( ActionEvent event ) {
			if (selectedEntity != null)
				copyToClipboard(selectedEntity);
			controlStartResume.requestFocusInWindow();
		}
	});
	buttonBar.add( copyButton );
}
 
源代码2 项目: jaamsim   文件: GUIFrame.java
private void addPasteButton(JToolBar buttonBar, Insets margin) {
	pasteButton = new JButton(new ImageIcon(GUIFrame.class.getResource("/resources/images/Paste-16.png")));
	pasteButton.setToolTipText(formatToolTip("Paste (Ctrl+V)",
			"Pastes a copy of an entity from the clipboard to the location of the most recent "
			+ "mouse click."));
	pasteButton.setMargin(margin);
	pasteButton.setFocusPainted(false);
	pasteButton.setRequestFocusEnabled(false);
	pasteButton.addActionListener(new ActionListener() {
		@Override
		public void actionPerformed( ActionEvent event ) {
			pasteEntityFromClipboard();
			controlStartResume.requestFocusInWindow();
		}
	});
	buttonBar.add( pasteButton );
}
 
源代码3 项目: nordpos   文件: Place.java
public void readValues(DataRead dr) throws BasicException {
    m_sId = dr.getString(1);
    m_sName = dr.getString(2);
    m_ix = dr.getInt(3).intValue();
    m_iy = dr.getInt(4).intValue();
    m_sfloor = dr.getString(5);
    
    m_bPeople = false;
    m_btn = new JButton();

    m_btn.setFocusPainted(false);
    m_btn.setFocusable(false);
    m_btn.setRequestFocusEnabled(false);
    m_btn.setHorizontalTextPosition(SwingConstants.CENTER);
    m_btn.setVerticalTextPosition(SwingConstants.BOTTOM);            
    m_btn.setIcon(ICO_FRE);
    m_btn.setText(m_sName);
}
 
源代码4 项目: nordpos   文件: MenuItemDefinition.java
public void addComponent(JPanelMenu menu) {
        
        JButton btn = new JButton(act); 
        
        btn.setFocusPainted(false);
        btn.setFocusable(false);
        btn.setRequestFocusEnabled(false);
        btn.setHorizontalAlignment(SwingConstants.LEADING);
        btn.setPreferredSize(new Dimension(220, 50));
        
//        btn.setSize(220, 50);
//        btn.setLocation(p);
//        if (p.x >= 470) {
//            p.x = 20;
//            p.y += 55;
//        } else {
//            p.x += 225;
//        }
//        comp.add(btn);        
        
        menu.addEntry(btn);
    }
 
源代码5 项目: nordpos   文件: JProductsSelector.java
public void addProduct(Image img, String name, ActionListener al) {
    
    JButton btn = new JButton();
    btn.applyComponentOrientation(getComponentOrientation());
    btn.setText(name);
    btn.setFont(btn.getFont().deriveFont((float)24));
    btn.setIcon(new ImageIcon(img));
    btn.setFocusPainted(false);
    btn.setFocusable(false);
    btn.setRequestFocusEnabled(false);
    btn.setHorizontalTextPosition(SwingConstants.CENTER);
    btn.setVerticalTextPosition(SwingConstants.BOTTOM);
    btn.setMargin(new Insets(2, 2, 2, 2));
    btn.setMaximumSize(new Dimension(80, 70));
    btn.setPreferredSize(new Dimension(80, 70));
    btn.setMinimumSize(new Dimension(80, 70));
    btn.addActionListener(al);
    flowpanel.add(btn);        
}
 
源代码6 项目: jason   文件: JasonID.java
protected JButton createToolBarButton(String toolTip, Icon icon, ActionListener act) {
    JButton button = new RolloverButton(icon);
    button.setMargin(new Insets(0, 0, 0, 0));
    button.setRequestFocusEnabled(false);
    button.setToolTipText(toolTip);
    button.setRequestFocusEnabled(false);
    button.addActionListener(act);
    return button;
}
 
源代码7 项目: rapidminer-studio   文件: SpinnerUI.java
@Override
protected Component createNextButton() {
	AbstractButton ab = (AbstractButton) super.createNextButton();
	JButton b = new SpinnerButton("up");
	b.setRequestFocusEnabled(false);
	b.addActionListener((ActionListener) getUIResource(ab.getActionListeners()));
	b.addMouseListener((MouseListener) getUIResource(ab.getMouseListeners()));
	return b;
}
 
源代码8 项目: beautyeye   文件: BESpinnerUI.java
protected Component createPreviousButton() {
//		if (NLXPStyle.getXP() != null) 
		{
			JButton xpButton = new GlyphButton(spinner, Type.down);
			Dimension size = UIManager.getDimension("Spinner.arrowButtonSize");
			xpButton.setPreferredSize(size);
			xpButton.setRequestFocusEnabled(false);
			installPreviousButtonListeners(xpButton);
			return xpButton;
		}
//		return super.createPreviousButton();
	}
 
源代码9 项目: beautyeye   文件: BESpinnerUI.java
protected Component createNextButton() {
//		if (NLXPStyle.getXP() != null) 
		{
			JButton xpButton = new GlyphButton(spinner, Type.up);
			Dimension size = UIManager.getDimension("Spinner.arrowButtonSize");
			xpButton.setPreferredSize(size);
			xpButton.setRequestFocusEnabled(false);
			installNextButtonListeners(xpButton);
			return xpButton;
		}
//		return super.createNextButton();
	}
 
源代码10 项目: nordpos   文件: JPaymentCashPos.java
public void addButton(String image, double amount) {
    JButton btn = new JButton();
    btn.setIcon(new ImageIcon(tnbbutton.getThumbNailText(dlSystem.getResourceAsImage(image), Formats.CURRENCY.formatValue(amount))));
    btn.setFocusPainted(false);
    btn.setFocusable(false);
    btn.setRequestFocusEnabled(false);
    btn.setHorizontalTextPosition(SwingConstants.CENTER);
    btn.setVerticalTextPosition(SwingConstants.BOTTOM);
    btn.setMargin(new Insets(2, 2, 2, 2));
    btn.addActionListener(new AddAmount(amount));
    jPanel6.add(btn);  
}
 
源代码11 项目: jaamsim   文件: GUIFrame.java
private void addClearFormattingButton(JToolBar buttonBar, Insets margin) {
	clearButton = new JButton(new ImageIcon(
			GUIFrame.class.getResource("/resources/images/Clear-16.png")));
	clearButton.setToolTipText(formatToolTip("Clear Formatting",
			"Resets the format inputs for the selected Entity or DisplayModel to their default "
			+ "values."));
	clearButton.setMargin(margin);
	clearButton.setFocusPainted(false);
	clearButton.setRequestFocusEnabled(false);
	clearButton.addActionListener(new ActionListener() {
		@Override
		public void actionPerformed( ActionEvent event ) {
			if (selectedEntity == null)
				return;
			ArrayList<KeywordIndex> kwList = new ArrayList<>();
			for (Input<?> in : selectedEntity.getEditableInputs()) {
				String cat = in.getCategory();
				if (in.isDefault() || !cat.equals(Entity.FORMAT) && !cat.equals(Entity.FONT))
					continue;
				KeywordIndex kw = InputAgent.formatArgs(in.getKeyword());
				kwList.add(kw);
			}
			if (kwList.isEmpty())
				return;
			KeywordIndex[] kws = new KeywordIndex[kwList.size()];
			kwList.toArray(kws);
			InputAgent.storeAndExecute(new KeywordCommand(selectedEntity, kws));
			controlStartResume.requestFocusInWindow();
		}
	});
	buttonBar.add( clearButton );
}
 
源代码12 项目: jaamsim   文件: GUIFrame.java
private void addFontColourButton(JToolBar buttonBar, Insets margin) {

		colourIcon = new ColorIcon(16, 16);
		colourIcon.setFillColor(Color.LIGHT_GRAY);
		colourIcon.setOutlineColor(Color.LIGHT_GRAY);
		fontColour = new JButton(colourIcon);
		fontColour.setMargin(margin);
		fontColour.setFocusPainted(false);
		fontColour.setRequestFocusEnabled(false);
		fontColour.setToolTipText(formatToolTip("Font Colour", "Sets the colour of the text."));
		fontColour.addActionListener(new ActionListener() {

			@Override
			public void actionPerformed( ActionEvent event ) {
				if (!(selectedEntity instanceof TextEntity))
					return;
				final TextEntity textEnt = (TextEntity) selectedEntity;
				final Color4d presentColour = textEnt.getFontColor();
				ArrayList<Color4d> coloursInUse = GUIFrame.getFontColoursInUse(sim);
				ColourMenu fontMenu = new ColourMenu(presentColour, coloursInUse, true) {

					@Override
					public void setColour(String colStr) {
						KeywordIndex kw = InputAgent.formatInput("FontColour", colStr);
						InputAgent.storeAndExecute(new KeywordCommand(selectedEntity, kw));
					}

				};
				fontMenu.show(fontColour, 0, fontColour.getPreferredSize().height);
				controlStartResume.requestFocusInWindow();
			}
		});

		buttonBar.add( fontColour );
	}
 
源代码13 项目: jaamsim   文件: GUIFrame.java
private void addLineColourButton(JToolBar buttonBar, Insets margin) {

		lineColourIcon = new ColorIcon(16, 16);
		lineColourIcon.setFillColor(Color.LIGHT_GRAY);
		lineColourIcon.setOutlineColor(Color.LIGHT_GRAY);
		lineColour = new JButton(lineColourIcon);
		lineColour.setMargin(margin);
		lineColour.setFocusPainted(false);
		lineColour.setRequestFocusEnabled(false);
		lineColour.setToolTipText(formatToolTip("Line Colour",
				"Sets the colour of the line."));
		lineColour.addActionListener(new ActionListener() {

			@Override
			public void actionPerformed( ActionEvent event ) {
				if (!(selectedEntity instanceof LineEntity))
					return;
				final LineEntity lineEnt = (LineEntity) selectedEntity;
				final Color4d presentColour = lineEnt.getLineColour();
				ArrayList<Color4d> coloursInUse = GUIFrame.getLineColoursInUse(sim);
				ColourMenu menu = new ColourMenu(presentColour, coloursInUse, true) {

					@Override
					public void setColour(String colStr) {
						KeywordIndex kw = InputAgent.formatInput("LineColour", colStr);
						InputAgent.storeAndExecute(new KeywordCommand(selectedEntity, kw));
					}

				};
				menu.show(lineColour, 0, lineColour.getPreferredSize().height);
				controlStartResume.requestFocusInWindow();
			}
		});

		buttonBar.add( lineColour );
	}
 
源代码14 项目: jaamsim   文件: GUIFrame.java
private void addFillColourButton(JToolBar buttonBar, Insets margin) {

		fillColourIcon = new ColorIcon(16, 16);
		fillColourIcon.setFillColor(Color.LIGHT_GRAY);
		fillColourIcon.setOutlineColor(Color.LIGHT_GRAY);
		fillColour = new JButton(fillColourIcon);
		fillColour.setMargin(margin);
		fillColour.setFocusPainted(false);
		fillColour.setRequestFocusEnabled(false);
		fillColour.setToolTipText(formatToolTip("Fill Colour",
				"Sets the colour of the fill."));
		fillColour.addActionListener(new ActionListener() {

			@Override
			public void actionPerformed( ActionEvent event ) {
				if (!(selectedEntity instanceof FillEntity))
					return;
				final FillEntity fillEnt = (FillEntity) selectedEntity;
				final Color4d presentColour = fillEnt.getFillColour();
				ArrayList<Color4d> coloursInUse = GUIFrame.getFillColoursInUse(sim);
				ColourMenu menu = new ColourMenu(presentColour, coloursInUse, true) {

					@Override
					public void setColour(String colStr) {
						KeywordIndex kw = InputAgent.formatInput("FillColour", colStr);
						InputAgent.storeAndExecute(new KeywordCommand(selectedEntity, kw));
					}

				};
				menu.show(fillColour, 0, fillColour.getPreferredSize().height);
				controlStartResume.requestFocusInWindow();
			}
		});

		buttonBar.add( fillColour );
	}
 
源代码15 项目: Data_Processor   文件: UnicornSplitPaneUI.java
/**  
 * Creates and return an instance of JButton that can be used to  
 * collapse the right component in the split pane.  
 */  
@Override  
protected JButton createRightOneTouchButton() {   
	JButton b = new JButton() {   
		private static final long serialVersionUID = 1L;

		public void setBorder(Border border) {   
		}   

		@Override  
		public void paint(Graphics g) {   
			if (splitPane != null) {   
				int[] xs = new int[3];   
				int[] ys = new int[3];   
				int blockSize;   

				// Fill the background first ...   
				g.setColor(new Color(255,0,255));   
				g.fillRect(0, 0, this.getWidth(),   
						this.getHeight());   

				// ... then draw the arrow.   
				if (orientation == JSplitPane.VERTICAL_SPLIT) {   
					blockSize = Math.min(getHeight(), oneTouchSize);   
					xs[0] = blockSize;   
					xs[1] = blockSize << 1;   
					xs[2] = 0;   
					ys[0] = blockSize;   
					ys[1] = ys[2] = 0;   
				} else {   
					blockSize = Math.min(getWidth(), oneTouchSize);   
					xs[0] = xs[2] = 0;   
					xs[1] = blockSize;   
					ys[0] = 0;   
					ys[1] = blockSize;   
					ys[2] = blockSize << 1;   
				}   
				g.setColor(new Color(255,0,255));     
				g.fillPolygon(xs, ys, 3);   
			}   
		}   
		// Don't want the button to participate in focus traversable.   

		public boolean isFocusTraversable() {   
			return false;   
		}   
	};   
	b.setMinimumSize(new Dimension(oneTouchSize, oneTouchSize));   
	b.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));   
	b.setFocusPainted(false);   
	b.setBorderPainted(false);   
	b.setRequestFocusEnabled(false);   
	return b;   
}
 
源代码16 项目: beautyeye   文件: BESplitPaneDivider.java
/**
 * Creates and return an instance of JButton that can be used to
 * collapse the right component in the split pane.
 *
 * @return the j button
 */
protected JButton createRightOneTouchButton() {
	JButton b = new JButton() {
		public void setBorder(Border border) {
		}
		public void paint(Graphics g) {
			if (splitPane != null) {
				int[]          xs = new int[3];
				int[]          ys = new int[3];
				int            blockSize;

				// Fill the background first ...
				g.setColor(this.getBackground());
				g.fillRect(0, 0, this.getWidth(),
						this.getHeight());

				//* 开启反走样
				BEUtils.setAntiAliasing((Graphics2D)g, true);
				
				// ... then draw the arrow.
				if (orientation == JSplitPane.VERTICAL_SPLIT) {
					blockSize = Math.min(getHeight(), oneTouchSize);
					xs[0] = blockSize;
					xs[1] = blockSize << 1;
					xs[2] = 0;
					ys[0] = blockSize;
					ys[1] = ys[2] = 0;
				}
				else {
					blockSize = Math.min(getWidth(), oneTouchSize);
					xs[0] = xs[2] = 0;
					xs[1] = blockSize;
					ys[0] = 0;
					ys[1] = blockSize;
					ys[2] = blockSize << 1;
				}

				//modified by jb2011
				g.setColor(TOUCH_BUTTON_COLOR);//Color.black);

				g.fillPolygon(xs, ys, 3);
				
				//* 关闭反走样
				BEUtils.setAntiAliasing((Graphics2D)g, false);
			}
		}
		// Don't want the button to participate in focus traversable.
		public boolean isFocusTraversable() {
			return false;
		}
	};
	b.setMinimumSize(new Dimension(oneTouchSize, oneTouchSize));
	b.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
	b.setFocusPainted(false);
	b.setBorderPainted(false);
	b.setRequestFocusEnabled(false);
	return b;
}
 
源代码17 项目: jaamsim   文件: GUIFrame.java
private void addDisplayModelSelector(JToolBar buttonBar, Insets margin) {

		dispModel = new JTextField("");
		dispModel.setEditable(false);
		dispModel.setHorizontalAlignment(JTextField.CENTER);
		dispModel.setPreferredSize(new Dimension(120, fileSave.getPreferredSize().height));
		dispModel.setToolTipText(formatToolTip("DisplayModel", "Sets the default appearance of the entity. "
				+ "A DisplayModel is analogous to a text style in a word processor."));
		buttonBar.add(dispModel);

		modelSelector = new JButton(new ImageIcon(
				GUIFrame.class.getResource("/resources/images/dropdown.png")));
		modelSelector.setMargin(margin);
		modelSelector.setFocusPainted(false);
		modelSelector.setRequestFocusEnabled(false);
		modelSelector.addActionListener(new ActionListener() {

			@Override
			public void actionPerformed( ActionEvent event ) {
				if (!(selectedEntity instanceof DisplayEntity))
					return;
				DisplayEntity dispEnt = (DisplayEntity) selectedEntity;
				if (!dispEnt.isGraphicsNominal() || dispEnt.getDisplayModelList().size() != 1)
					return;
				final String presentModelName = dispEnt.getDisplayModelList().get(0).getName();
				Input<?> in = dispEnt.getInput("DisplayModel");
				ArrayList<String> choices = in.getValidOptions(selectedEntity);
				PreviewablePopupMenu menu = new PreviewablePopupMenu(presentModelName, choices, true) {

					@Override
					public void setValue(String str) {
						dispModel.setText(str);
						KeywordIndex kw = InputAgent.formatArgs("DisplayModel", str);
						InputAgent.storeAndExecute(new KeywordCommand(dispEnt, kw));
					}

				};
				menu.show(dispModel, 0, dispModel.getPreferredSize().height);
				controlStartResume.requestFocusInWindow();
			}
		});

		buttonBar.add(modelSelector);
	}
 
源代码18 项目: Darcula   文件: DarculaSplitPaneDivider.java
@Override
protected JButton createRightOneTouchButton() {
    JButton b = new JButton() {
        public void setBorder(Border border) {
        }
        public void paint(Graphics g) {
            if (splitPane != null) {
                int[]          xs = new int[3];
                int[]          ys = new int[3];
                int            blockSize;

                // Fill the background first ...
                g.setColor(this.getBackground());
                g.fillRect(0, 0, this.getWidth(),
                        this.getHeight());

                // ... then draw the arrow.
                if (orientation == JSplitPane.VERTICAL_SPLIT) {
                    blockSize = Math.min(getHeight(), ONE_TOUCH_SIZE);
                    xs[0] = blockSize;
                    xs[1] = blockSize << 1;
                    xs[2] = 0;
                    ys[0] = blockSize;
                    ys[1] = ys[2] = 0;
                }
                else {
                    blockSize = Math.min(getWidth(), ONE_TOUCH_SIZE);
                    xs[0] = xs[2] = 0;
                    xs[1] = blockSize;
                    ys[0] = 0;
                    ys[1] = blockSize;
                    ys[2] = blockSize << 1;
                }
                g.setColor(new DoubleColor(Gray._255, UIUtil.getLabelForeground()));
                g.fillPolygon(xs, ys, 3);
            }
        }
        // Don't want the button to participate in focus traversable.
        public boolean isFocusTraversable() {
            return false;
        }
    };
    b.setMinimumSize(new Dimension(ONE_TOUCH_SIZE, ONE_TOUCH_SIZE));
    b.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
    b.setFocusPainted(false);
    b.setBorderPainted(false);
    b.setRequestFocusEnabled(false);
    return b;
}
 
源代码19 项目: jaamsim   文件: GUIFrame.java
private void addTextHeightButtons(JToolBar buttonBar, Insets margin) {

		ActionListener textHeightListener = new ActionListener() {

			@Override
			public void actionPerformed( ActionEvent event ) {
				if (!(selectedEntity instanceof TextEntity))
					return;
				TextEntity textEnt = (TextEntity) selectedEntity;

				double height = textEnt.getTextHeight();
				double spacing = sim.getSimulation().getSnapGridSpacing();
				if (textEnt instanceof OverlayText || textEnt instanceof BillboardText)
					spacing = 1.0d;
				height = Math.round(height/spacing) * spacing;

				if (event.getActionCommand().equals("LargerText")) {
					height += spacing;
				}
				else if (event.getActionCommand().equals("SmallerText")) {
					height -= spacing;
					height = Math.max(spacing, height);
				}

				String format = "%.1f  m";
				if (textEnt instanceof OverlayText || textEnt instanceof BillboardText)
					format = "%.0f";
				String str = String.format(format, height);
				textHeight.setText(str);
				KeywordIndex kw = InputAgent.formatInput("TextHeight", str);
				InputAgent.storeAndExecute(new KeywordCommand((Entity)textEnt, kw));
				controlStartResume.requestFocusInWindow();
			}
		};

		largerText = new JButton(new ImageIcon(
				GUIFrame.class.getResource("/resources/images/LargerText-16.png")));
		largerText.setMargin(margin);
		largerText.setFocusPainted(false);
		largerText.setRequestFocusEnabled(false);
		largerText.setToolTipText(formatToolTip("Larger Text",
				"Increases the text height to the next higher multiple of the snap grid spacing."));
		largerText.setActionCommand("LargerText");
		largerText.addActionListener( textHeightListener );

		smallerText = new JButton(new ImageIcon(
				GUIFrame.class.getResource("/resources/images/SmallerText-16.png")));
		smallerText.setMargin(margin);
		smallerText.setFocusPainted(false);
		smallerText.setRequestFocusEnabled(false);
		smallerText.setToolTipText(formatToolTip("Smaller Text",
				"Decreases the text height to the next lower multiple of the snap grid spacing."));
		smallerText.setActionCommand("SmallerText");
		smallerText.addActionListener( textHeightListener );

		buttonBar.add( largerText );
		buttonBar.add( smallerText );
	}
 
源代码20 项目: jaamsim   文件: GUIFrame.java
private void addZButtons(JToolBar buttonBar, Insets margin) {

		ActionListener actionListener = new ActionListener() {

			@Override
			public void actionPerformed( ActionEvent event ) {
				if (!(selectedEntity instanceof DisplayEntity)
						|| selectedEntity instanceof OverlayEntity)
					return;
				DisplayEntity dispEnt = (DisplayEntity) selectedEntity;

				double delta = sim.getSimulation().getSnapGridSpacing()/100.0d;
				Vec3d pos = dispEnt.getPosition();
				ArrayList<Vec3d> points = dispEnt.getPoints();
				Vec3d offset = new Vec3d();

				if (event.getActionCommand().equals("Up")) {
					pos.z += delta;
					offset.z += delta;
				}
				else if (event.getActionCommand().equals("Down")) {
					pos.z -= delta;
					offset.z -= delta;
				}

				// Normal object
				KeywordIndex posKw = InputAgent.formatVec3dInput("Position", pos, DistanceUnit.class);
				if (!dispEnt.usePointsInput()) {
					InputAgent.storeAndExecute(new KeywordCommand(dispEnt, posKw));
					controlStartResume.requestFocusInWindow();
					return;
				}

				// Polyline object
				KeywordIndex ptsKw = InputAgent.formatPointsInputs("Points", points, offset);
				InputAgent.storeAndExecute(new KeywordCommand(dispEnt, posKw, ptsKw));
				controlStartResume.requestFocusInWindow();
			}
		};

		increaseZ = new JButton(new ImageIcon(
				GUIFrame.class.getResource("/resources/images/PlusZ-16.png")));
		increaseZ.setMargin(margin);
		increaseZ.setFocusPainted(false);
		increaseZ.setRequestFocusEnabled(false);
		increaseZ.setToolTipText(formatToolTip("Move Up",
				"Increases the selected object's z-coordinate by one hundredth of the snap-grid "
				+ "spacing. By moving the object closer to the camera, it will appear on top of "
				+ "other objects with smaller z-coordinates."));
		increaseZ.setActionCommand("Up");
		increaseZ.addActionListener( actionListener );

		decreaseZ = new JButton(new ImageIcon(
				GUIFrame.class.getResource("/resources/images/MinusZ-16.png")));
		decreaseZ.setMargin(margin);
		decreaseZ.setFocusPainted(false);
		decreaseZ.setRequestFocusEnabled(false);
		decreaseZ.setToolTipText(formatToolTip("Move Down",
				"Decreases the selected object's z-coordinate by one hundredth of the snap-grid "
				+ "spacing. By moving the object farther from the camera, it will appear below "
				+ "other objects with larger z-coordinates."));
		decreaseZ.setActionCommand("Down");
		decreaseZ.addActionListener( actionListener );

		buttonBar.add( increaseZ );
		buttonBar.add( decreaseZ );
	}