本文整理了Java中javax.swing.JDialog.setUndecorated()
方法的一些代码示例,展示了JDialog.setUndecorated()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JDialog.setUndecorated()
方法的具体详情如下:
包路径:javax.swing.JDialog
类名称:JDialog
方法名:setUndecorated
暂无
代码示例来源:origin: magefree/mage
public static void main(String... args) {
JFrame f = new JFrame();
f.setSize(600, 400);
f.setVisible(true);
MageFloatPane fp = new MageFloatPane();
fp.setCard("Card");
MageRoundPane popupContainer = new MageRoundPane();
popupContainer.setLayout(null);
popupContainer.add(fp);
//popupContainer.setVisible(false);
popupContainer.setBounds(0, 0, 320 + 80, 201 + 80);
JDialog floatOnParent = new JDialog(f, false);
floatOnParent.setUndecorated(true);
floatOnParent.getContentPane().add(popupContainer);
floatOnParent.setBounds(300, 100, 300, 200);
floatOnParent.setVisible(true);
}
}
代码示例来源:origin: xyz.cofe/docking-frames-common
/**
* Sets whether the dialog has a decoration or not.
* @param undecorated whether to decorate or not
* @see JDialog#setUndecorated(boolean)
*/
public void setUndecorated( boolean undecorated ){
dialog.setUndecorated( undecorated );
}
代码示例来源:origin: org.opentcs.thirdparty.dockingframes/docking-frames-common
/**
* Sets whether the dialog has a decoration or not.
* @param undecorated whether to decorate or not
* @see JDialog#setUndecorated(boolean)
*/
public void setUndecorated( boolean undecorated ){
dialog.setUndecorated( undecorated );
}
代码示例来源:origin: stackoverflow.com
JDialog dialog = new JDialog(...);
dialog.setUndecorated(true);
代码示例来源:origin: stackoverflow.com
JDialog dialog = new JDialog();
dialog.setUndecorated(true);
代码示例来源:origin: stackoverflow.com
JDialog dialog = new JDialog();
dialog.setUndecorated(true);
JLabel label = new JLabel( new ImageIcon(...) );
dialog.add( label );
dialog.pack();
dialog.setVisible(true);
代码示例来源:origin: com.eas.platypus/platypus-js-forms
private void checkUndecorated(RootPaneContainer topContainer) {
if (UIManager.getLookAndFeel().getClass().getName().startsWith("com.jtattoo.plaf")
|| UIManager.getLookAndFeel().getClass().getName().startsWith("de.javasoft.plaf.synthetica")) {
if (topContainer instanceof JFrame) {
((JFrame) topContainer).setUndecorated(true);
} else if (topContainer instanceof JDialog) {
((JDialog) topContainer).setUndecorated(true);
}
}
}
代码示例来源:origin: stackoverflow.com
public static void main(String[] args) throws InterruptedException {
JDialog frame = new JDialog((Frame) null, "MC Immovable");
frame.setUndecorated(true);
JPanel panel = new JPanel();
panel.setBorder(BorderFactory.createEtchedBorder(Color.GREEN, Color.RED));
panel.add(new JLabel("You can't move this"));
frame.setContentPane(panel);
frame.pack();
frame.setLocationRelativeTo(null);
frame.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
frame.setVisible(true);
}
代码示例来源:origin: stackoverflow.com
JDialog dialog=new JDialog(frmInstance);
dialog.setUndecorated(true);
dialog.setVisible(true);
dialog.setSize(200,100);
代码示例来源:origin: stackoverflow.com
JDialog dialog = new JDialog();
dialog.setUndecorated(true);
dialog.getRootPane().setWindowDecorationStyle(JRootPane.PLAIN_DIALOG);
代码示例来源:origin: protegeproject/protege
/**
* Constructs a ProgressDialog. A ProgressDialog contains a message and an optional sub-message.
*/
public ProgressDialog() {
dlg.setUndecorated(true);
JPanel contentPane = new JPanel();
contentPane.setBorder(BorderFactory.createMatteBorder(1, 1, 1, 1, Color.LIGHT_GRAY));
dlg.setContentPane(contentPane);
contentPane.setLayout(new BorderLayout());
contentPane.add(view.asJComponent(), BorderLayout.NORTH);
}
代码示例来源:origin: stackoverflow.com
final JDialog dialog = new JDialog();
dialog.setUndecorated(true);
dialog.setSize(0, 0);
dialog.setModal(true);
dialog.pack();
代码示例来源:origin: edu.stanford.protege/protege-editor-owl
/**
* Constructs a ProgressDialog. A ProgressDialog contains a message and an optional sub-message.
*/
public ProgressDialog() {
dlg.setUndecorated(true);
JPanel contentPane = new JPanel();
contentPane.setBorder(BorderFactory.createMatteBorder(1, 1, 1, 1, Color.LIGHT_GRAY));
dlg.setContentPane(contentPane);
contentPane.setLayout(new BorderLayout());
contentPane.add(view.asJComponent(), BorderLayout.NORTH);
}
代码示例来源:origin: stackoverflow.com
JDialog dlg = new JDialog();
// Remove dialog decorations to make it look like a splashscreen.
dlg.setUndecorated(true);
dlg.setModal(true);
dlg.setLayout(new BorderLayout());
// Load image.
ImageIcon img = new ImageIcon(getClass().getResource("/foo/bar/splash.png");
// Add image to center of dialog.
dlg.add(img, BorderLayout.CENTER);
dlg.setLocationRelativeTo(null);
dlg.setVisible(true);
// ... Perform application initialisation here.
// Initialisation complete so hide dialog.
dlg.setVisible(false);
dlg = null;
代码示例来源:origin: com.synaptix.toast/toast-tk-automation-client
protected void showSplashScreen() throws MalformedURLException {
dialog = new JDialog((Frame) null);
dialog.setModal(false);
dialog.setUndecorated(true);
URL resource = SwingInspectionFrame.class.getClassLoader().getResource("Spalsh.png");
ImageIcon image = new ImageIcon(resource);
Image scaledInstance = image.getImage().getScaledInstance(500, 300, Image.SCALE_SMOOTH);
JLabel background = new JLabel(new ImageIcon(scaledInstance));
background.setLayout(new BorderLayout());
dialog.add(background);
progress = new JProgressBar();
background.add(progress, BorderLayout.SOUTH);
dialog.pack();
dialog.setLocationRelativeTo(null);
dialog.setVisible(true);
}
代码示例来源:origin: stackoverflow.com
JDialog jDialog = new JDialog();
jDialog.setLayout(new GridBagLayout());
jDialog.add(new JLabel("Please wait..."));
jDialog.setMinimumSize(new Dimension(150, 50));
jDialog.setResizable(false);
jDialog.setModal(false);
jDialog.setUndecorated(true);
jDialog.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
jDialog.setLocationRelativeTo(null);
jDialog.setVisible(true);
代码示例来源:origin: UNIVALI-LITE/Portugol-Studio
private void configuraLoader() {
boolean usandoTemaDark = Configuracoes.getInstancia().isTemaDark();
String caminhoIcone = String.format("/br/univali/ps/ui/icones/%s/grande/load.gif", usandoTemaDark ? "Dark" : "Portugol");
Icon icone = new ImageIcon(getClass().getResource(caminhoIcone));
indicadorProgresso = new JDialog();
indicadorProgresso.setUndecorated(true);
JPanel painel = new JPanel();
painel.setLayout(new BoxLayout(painel, BoxLayout.Y_AXIS));
painel.setBackground(ColorController.FUNDO_CLARO);
painel.add(new JLabel(icone, JLabel.CENTER));
JLabel instalando = new JLabel("Baixando...", JLabel.CENTER);
instalando.setForeground(ColorController.COR_LETRA);
instalando.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
painel.add(instalando);
indicadorProgresso.add(painel);
indicadorProgresso.setModalityType(Dialog.ModalityType.APPLICATION_MODAL);
indicadorProgresso.pack();
indicadorProgresso.setLocationRelativeTo(Lancador.getInstance().getJFrame());
}
代码示例来源:origin: com.eas.platypus/platypus-js-forms
@ScriptFunction
public void setUndecorated(boolean aValue) {
undecorated = aValue;
if (surface instanceof JDialog) {
((JDialog) surface).setUndecorated(undecorated);
}
if (surface instanceof JInternalFrame) {
//((JInternalFrame) surface).setUndecorated(undecorated);
}
if (surface instanceof JFrame) {
((JFrame) surface).setUndecorated(undecorated);
}
}
代码示例来源:origin: biojava/biojava
private void init(){
autoSuggestProvider = new DefaultAutoSuggestProvider();
lastWord = "";
regular = getFont();
busy = new Font(getFont().getName(), Font.ITALIC, getFont().getSize());
suggestions = new Vector<String>();
defaultText = DEFAULT_TEXT;
dialog = new JDialog();
dialog.setUndecorated(true);
dialog.setFocusableWindowState(false);
dialog.setFocusable(false);
initSuggestionList();
}
代码示例来源:origin: org.nuiton.jaxx/jaxx-runtime-swing-widget
public void showInDialog(Frame ui, boolean undecorated) {
JDialog f = new JDialog(ui, true);
f.add(this);
if (iconPath != null) {
f.setIconImage(SwingUtil.createIcon(iconPath).getImage());
}
f.setResizable(false);
f.setSize(550, 450);
f.setUndecorated(undecorated);
JRootPane rootPane = f.getRootPane();
rootPane.setDefaultButton(close);
rootPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("ESCAPE"), "close");
rootPane.getActionMap().put("close", closeAction);
SwingUtil.center(ui, f);
f.setVisible(true);
}
内容来源于网络,如有侵权,请联系作者删除!