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


Java DefaultLookup.get方法代码示例

本文整理汇总了Java中sun.swing.DefaultLookup.get方法的典型用法代码示例。如果您正苦于以下问题:Java DefaultLookup.get方法的具体用法?Java DefaultLookup.get怎么用?Java DefaultLookup.get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在sun.swing.DefaultLookup的用法示例。


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

示例1: getInputMap

import sun.swing.DefaultLookup; //导入方法依赖的package包/类
InputMap getInputMap(int condition) {
    if (condition == JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT) {
        InputMap keyMap =
            (InputMap)DefaultLookup.get(table, this,
                                        "Table.ancestorInputMap");
        InputMap rtlKeyMap;

        if (table.getComponentOrientation().isLeftToRight() ||
            ((rtlKeyMap = (InputMap)DefaultLookup.get(table, this,
                                        "Table.ancestorInputMap.RightToLeft")) == null)) {
            return keyMap;
        } else {
            rtlKeyMap.setParent(keyMap);
            return rtlKeyMap;
        }
    }
    return null;
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:19,代码来源:BasicTableUI.java

示例2: getInputMap

import sun.swing.DefaultLookup; //导入方法依赖的package包/类
InputMap getInputMap(int condition) {
    if (condition == JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT) {
        return (InputMap)DefaultLookup.get(toolBar, this,
                "ToolBar.ancestorInputMap");
    }
    return null;
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:8,代码来源:BasicToolBarUI.java

示例3: getMinimumHorizontalSize

import sun.swing.DefaultLookup; //导入方法依赖的package包/类
public Dimension getMinimumHorizontalSize() {
    Dimension minHorizDim = (Dimension)DefaultLookup.get(slider,
            this, "Slider.minimumHorizontalSize");
    if (minHorizDim == null) {
        minHorizDim = new Dimension(36, 21);
    }
    return minHorizDim;
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:9,代码来源:BasicSliderUI.java

示例4: getPreferredInnerVertical

import sun.swing.DefaultLookup; //导入方法依赖的package包/类
protected Dimension getPreferredInnerVertical() {
    Dimension vertDim = (Dimension)DefaultLookup.get(progressBar, this,
        "ProgressBar.verticalSize");
    if (vertDim == null) {
        vertDim = new Dimension(12, 146);
    }
    return vertDim;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:BasicProgressBarUI.java

示例5: getInputMap

import sun.swing.DefaultLookup; //导入方法依赖的package包/类
InputMap getInputMap(int condition, JComponent c) {
    if (condition == JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT) {
        return (InputMap)DefaultLookup.get(c, this,
                                   "RootPane.ancestorInputMap");
    }

    if (condition == JComponent.WHEN_IN_FOCUSED_WINDOW) {
        return createInputMap(condition, c);
    }
    return null;
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:12,代码来源:BasicRootPaneUI.java

示例6: paint

import sun.swing.DefaultLookup; //导入方法依赖的package包/类
public void paint(Graphics g) {
    Icon icon = frame.getFrameIcon();
    if (icon == null) {
      icon = (Icon)DefaultLookup.get(frame, frame.getUI(),
              "InternalFrame.icon");
    }
    if (icon != null) {
        // Resize to 16x16 if necessary.
        if (icon instanceof ImageIcon && (icon.getIconWidth() > 16 || icon.getIconHeight() > 16)) {
            Image img = ((ImageIcon)icon).getImage();
            ((ImageIcon)icon).setImage(img.getScaledInstance(16, 16, Image.SCALE_SMOOTH));
        }
        icon.paintIcon(this, g, 0, 0);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:16,代码来源:BasicInternalFrameTitlePane.java

示例7: getPreferredInnerHorizontal

import sun.swing.DefaultLookup; //导入方法依赖的package包/类
/**
 * Returns preferred size of the horizontal {@code JProgressBar}.
 *
 * @return preferred size of the horizontal {@code JProgressBar}
 */
protected Dimension getPreferredInnerHorizontal() {
    Dimension horizDim = (Dimension)DefaultLookup.get(progressBar, this,
        "ProgressBar.horizontalSize");
    if (horizDim == null) {
        horizDim = new Dimension(146, 12);
    }
    return horizDim;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:14,代码来源:BasicProgressBarUI.java

示例8: getPreferredInnerHorizontal

import sun.swing.DefaultLookup; //导入方法依赖的package包/类
protected Dimension getPreferredInnerHorizontal() {
    Dimension horizDim = (Dimension)DefaultLookup.get(progressBar, this,
        "ProgressBar.horizontalSize");
    if (horizDim == null) {
        horizDim = new Dimension(146, 12);
    }
    return horizDim;
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:9,代码来源:BasicProgressBarUI.java

示例9: getInputMap

import sun.swing.DefaultLookup; //导入方法依赖的package包/类
InputMap getInputMap(int condition) {
    if (condition == JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT) {
        return (InputMap)DefaultLookup.get(splitPane, this,
                                           "SplitPane.ancestorInputMap");
    }
    return null;
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:8,代码来源:BasicSplitPaneUI.java

示例10: createMessageArea

import sun.swing.DefaultLookup; //导入方法依赖的package包/类
/**
 * Messaged from installComponents to create a Container containing the
 * body of the message. The icon is the created by calling
 * <code>addIcon</code>.
 */
protected Container createMessageArea() {
    JPanel top = new JPanel();
    Border topBorder = (Border)DefaultLookup.get(optionPane, this,
                                         "OptionPane.messageAreaBorder");
    if (topBorder != null) {
        top.setBorder(topBorder);
    }
    top.setLayout(new BorderLayout());

    /* Fill the body. */
    Container          body = new JPanel(new GridBagLayout());
    Container          realBody = new JPanel(new BorderLayout());

    body.setName("OptionPane.body");
    realBody.setName("OptionPane.realBody");

    if (getIcon() != null) {
        JPanel sep = new JPanel();
        sep.setName("OptionPane.separator");
        sep.setPreferredSize(new Dimension(15, 1));
        realBody.add(sep, BorderLayout.BEFORE_LINE_BEGINS);
    }
    realBody.add(body, BorderLayout.CENTER);

    GridBagConstraints cons = new GridBagConstraints();
    cons.gridx = cons.gridy = 0;
    cons.gridwidth = GridBagConstraints.REMAINDER;
    cons.gridheight = 1;
    cons.anchor = DefaultLookup.getInt(optionPane, this,
                  "OptionPane.messageAnchor", GridBagConstraints.CENTER);
    cons.insets = new Insets(0,0,3,0);

    addMessageComponents(body, cons, getMessage(),
                      getMaxCharactersPerLineCount(), false);
    top.add(realBody, BorderLayout.CENTER);

    addIcon(top);
    return top;
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:45,代码来源:BasicOptionPaneUI.java

示例11: configureMessageLabel

import sun.swing.DefaultLookup; //导入方法依赖的package包/类
/**
 * Configures any necessary colors/fonts for the specified label
 * used representing the message.
 */
private void configureMessageLabel(JLabel label) {
    Color color = (Color)DefaultLookup.get(optionPane, this,
                                           "OptionPane.messageForeground");
    if (color != null) {
        label.setForeground(color);
    }
    Font messageFont = (Font)DefaultLookup.get(optionPane, this,
                                               "OptionPane.messageFont");
    if (messageFont != null) {
        label.setFont(messageFont);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:17,代码来源:BasicOptionPaneUI.java

示例12: configureButton

import sun.swing.DefaultLookup; //导入方法依赖的package包/类
/**
 * Configures any necessary colors/fonts for the specified button
 * used representing the button portion of the optionpane.
 */
private void configureButton(JButton button) {
    Font buttonFont = (Font)DefaultLookup.get(optionPane, this,
                                        "OptionPane.buttonFont");
    if (buttonFont != null) {
        button.setFont(buttonFont);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:BasicOptionPaneUI.java

示例13: createInputMap

import sun.swing.DefaultLookup; //导入方法依赖的package包/类
InputMap createInputMap(int condition) {
    if (condition == JComponent.WHEN_IN_FOCUSED_WINDOW) {
        Object[] bindings = (Object[])DefaultLookup.get(
                frame, this, "InternalFrame.windowBindings");

        if (bindings != null) {
            return LookAndFeel.makeComponentInputMap(frame, bindings);
        }
    }
    return null;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:BasicInternalFrameUI.java

示例14: getInputMap

import sun.swing.DefaultLookup; //导入方法依赖的package包/类
InputMap getInputMap(int condition) {
    if (condition == JComponent.WHEN_IN_FOCUSED_WINDOW) {
        Object[] bindings = (Object[])DefaultLookup.get(
                         optionPane, this, "OptionPane.windowBindings");
        if (bindings != null) {
            return LookAndFeel.makeComponentInputMap(optionPane, bindings);
        }
    }
    return null;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:BasicOptionPaneUI.java

示例15: getInputMap

import sun.swing.DefaultLookup; //导入方法依赖的package包/类
/**
 * Returns the InputMap to install for <code>condition</code>.
 */
private InputMap getInputMap(int condition) {
    if (condition == JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT) {
        return (InputMap)DefaultLookup.get(spinner, this,
                "Spinner.ancestorInputMap");
    }
    return null;
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:11,代码来源:BasicSpinnerUI.java


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