本文整理了Java中java.awt.Window.setOpacity()
方法的一些代码示例,展示了Window.setOpacity()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Window.setOpacity()
方法的具体详情如下:
包路径:java.awt.Window
类名称:Window
方法名:setOpacity
暂无
代码示例来源:origin: stackoverflow.com
autoSuggestionPopUpWindow.setOpacity(opacity);
代码示例来源:origin: com.fifesoft.rtext/fife.common
public boolean setOpacity(Window w, float value) {
if (!isTranslucencySupported(false)) {
return false;
}
w.setOpacity(value);
return true;
}
代码示例来源:origin: stackoverflow.com
import java.awt.Window;
import javax.swing.JPopupMenu;
import javax.swing.SwingUtilities;
public class TranslucentPopup extends JPopupMenu {
{
// need to disable that to work
setLightWeightPopupEnabled(false);
}
@Override
public void setVisible(boolean visible) {
if (visible == isVisible())
return;
super.setVisible(visible);
if (visible) {
// attempt to set tranparency
try {
Window w = SwingUtilities.getWindowAncestor(this);
w.setOpacity(0.667F);
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
代码示例来源:origin: stackoverflow.com
contentPane.add(positionLabel, BorderLayout.PAGE_END);
window.setContentPane(contentPane);
window.setOpacity(0.5f);
window.setSize(200, 100);
window.setLocation(x + window.getWidth(), y + window.getHeight());
代码示例来源:origin: stackoverflow.com
frame.setOpacity(0f);
frame.setBackground(new Color(0, 0, 0, 0));
BackgroundPane pane = new BackgroundPane();
opacity += startAt;
window.setOpacity(opacity);
代码示例来源:origin: stackoverflow.com
window.add(label);
window.setOpacity(.8f);
DragSource.getDefaultDragSource().addDragSourceMotionListener(new DragSourceMotionListener() {
@Override public void dragMouseMoved(DragSourceDragEvent dsde) {
代码示例来源:origin: stackoverflow.com
autoSuggestionPopUpWindow.setOpacity(opacity);
代码示例来源:origin: stackoverflow.com
autoSuggestionPopUpWindow.setOpacity(opacity);
内容来源于网络,如有侵权,请联系作者删除!