下面列出了怎么用javax.swing.Box.Filler的API类实例代码及写法,或者点击链接到github查看源代码。
protected Filler getAnotherObject() {
return null; // TODO: could not update property
// return new Filler(
// new Dimension(9, 8),
// new Dimension(7, 6),
// new Dimension(5, 4));
}
protected Filler getAnotherObject() {
return null; // TODO: could not update property
// return new Filler(
// new Dimension(9, 8),
// new Dimension(7, 6),
// new Dimension(5, 4));
}
protected Filler getAnotherObject() {
return null; // TODO: could not update property
// return new Filler(
// new Dimension(9, 8),
// new Dimension(7, 6),
// new Dimension(5, 4));
}
protected Filler getAnotherObject() {
return null; // TODO: could not update property
// return new Filler(
// new Dimension(9, 8),
// new Dimension(7, 6),
// new Dimension(5, 4));
}
public String getPrecedingLabel() {
Container container = component.getParent();
if (container == null) {
return null;
}
List<Component> allComponents = findAllComponents();
// Find labels in the same row (LTR)
// In the same row: labelx < componentx, labely >= componenty
Point locComponent = component.getLocationOnScreen();
List<Component> rowLeft = new ArrayList<Component>();
for (Component label : allComponents) {
Point locLabel = label.getLocationOnScreen();
if (!(label instanceof JPanel) && locLabel.getX() < locComponent.getX() && locLabel.getY() >= locComponent.getY()
&& locLabel.getY() <= locComponent.getY() + component.getHeight() && !(label instanceof Filler)) {
rowLeft.add(label);
}
}
Collections.sort(rowLeft, new Comparator<Component>() {
@Override
public int compare(Component o1, Component o2) {
Point locO1 = o1.getLocationOnScreen();
Point locO2 = o2.getLocationOnScreen();
return (int) (locO1.getX() - locO2.getX());
}
});
if (rowLeft.size() > 0 && rowLeft.get(rowLeft.size() - 1) instanceof JLabel) {
return stripLastColon(((JLabel) rowLeft.get(rowLeft.size() - 1)).getText().trim());
}
return null;
}
protected Filler getAnotherObject() {
return null; // TODO: could not update property
// return new Filler(
// new Dimension(9, 8),
// new Dimension(7, 6),
// new Dimension(5, 4));
}
protected Filler getAnotherObject() {
return null; // TODO: could not update property
// return new Filler(
// new Dimension(9, 8),
// new Dimension(7, 6),
// new Dimension(5, 4));
}
private void initFiller() {
Filler filler = new Filler(new Dimension(0, 0), new Dimension(0, 0), new Dimension(32767, 32767));
filler.addMouseListener(new MouseAdapter() {
@Override
public void mouseEntered(MouseEvent me) {
mainFrame.getGlassPane().setVisible(false);
}
});
add(filler, BorderLayout.CENTER);
}
private Filler getLeftFiller() {
Filler filler = new Filler(
new Dimension(0, 0),
new Dimension(0, 0),
new Dimension(32767, 32767));
filler.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent me) {
mainFrame.getGlassPane().setVisible(false);
}
});
return filler;
}
protected Filler getAnotherObject() {
return null; // TODO: could not update property
// return new Filler(
// new Dimension(9, 8),
// new Dimension(7, 6),
// new Dimension(5, 4));
}
protected Filler getAnotherObject() {
return null; // TODO: could not update property
// return new Filler(
// new Dimension(9, 8),
// new Dimension(7, 6),
// new Dimension(5, 4));
}
protected Filler getAnotherObject() {
return null; // TODO: could not update property
// return new Filler(
// new Dimension(9, 8),
// new Dimension(7, 6),
// new Dimension(5, 4));
}
protected Filler getAnotherObject() {
return null; // TODO: could not update property
// return new Filler(
// new Dimension(9, 8),
// new Dimension(7, 6),
// new Dimension(5, 4));
}
protected Filler getAnotherObject() {
return null; // TODO: could not update property
// return new Filler(
// new Dimension(9, 8),
// new Dimension(7, 6),
// new Dimension(5, 4));
}
protected Filler getAnotherObject() {
return null; // TODO: could not update property
// return new Filler(
// new Dimension(9, 8),
// new Dimension(7, 6),
// new Dimension(5, 4));
}
protected Filler getAnotherObject() {
return null; // TODO: could not update property
// return new Filler(
// new Dimension(9, 8),
// new Dimension(7, 6),
// new Dimension(5, 4));
}
private void addCheckBox(String title, String toolTip, ItemListener listener, int classId, int valueId) {
gbc.weightx = 1;
gbc.gridx = 0;
final PCheckBox check = new PCheckBox(nightMode, fontSize) {
@Override
public void repaint() {
this.setSize(parent.getWidth(), 20);
super.repaint();
}
};
check.setText(title);
check.setSelected(rule.doesRuleApplyToClassValue(classId, valueId, true)); // st value before listener
check.addItemListener(listener);
check.setVerticalAlignment(javax.swing.SwingConstants.TOP);
check.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
check.setToolTipText(toolTip);
this.add(check, gbc);
// do not add the "all" checkbox (with -1 ID) to the apply all list
if (classId == -1) {
allCheckBox = check;
} else {
applyClassesCheckboxes.add(check);
}
gbc.weightx = 9999;
gbc.gridx = 1;
this.add(new Filler(new Dimension(0,0),new Dimension(9999,9999),new Dimension(9999,9999)), gbc);
gbc.gridy++;
}
protected Filler getObject() {
return new Filler(
new Dimension(1, 2),
new Dimension(3, 4),
new Dimension(5, 6));
}
protected Filler getObject() {
return new Filler(
new Dimension(1, 2),
new Dimension(3, 4),
new Dimension(5, 6));
}
protected Filler getObject() {
return new Filler(
new Dimension(1, 2),
new Dimension(3, 4),
new Dimension(5, 6));
}
protected Filler getObject() {
return new Filler(
new Dimension(1, 2),
new Dimension(3, 4),
new Dimension(5, 6));
}
protected Filler getObject() {
return new Filler(
new Dimension(1, 2),
new Dimension(3, 4),
new Dimension(5, 6));
}
protected Filler getObject() {
return new Filler(
new Dimension(1, 2),
new Dimension(3, 4),
new Dimension(5, 6));
}
protected Filler getObject() {
return new Filler(
new Dimension(1, 2),
new Dimension(3, 4),
new Dimension(5, 6));
}
protected Filler getObject() {
return new Filler(
new Dimension(1, 2),
new Dimension(3, 4),
new Dimension(5, 6));
}
protected Filler getObject() {
return new Filler(
new Dimension(1, 2),
new Dimension(3, 4),
new Dimension(5, 6));
}
protected Filler getObject() {
return new Filler(
new Dimension(1, 2),
new Dimension(3, 4),
new Dimension(5, 6));
}
protected Filler getObject() {
return new Filler(
new Dimension(1, 2),
new Dimension(3, 4),
new Dimension(5, 6));
}
protected Filler getObject() {
return new Filler(
new Dimension(1, 2),
new Dimension(3, 4),
new Dimension(5, 6));
}
protected Filler getObject() {
return new Filler(
new Dimension(1, 2),
new Dimension(3, 4),
new Dimension(5, 6));
}