本文整理汇总了Java中org.intellij.lang.annotations.JdkConstants.HorizontalAlignment方法的典型用法代码示例。如果您正苦于以下问题:Java JdkConstants.HorizontalAlignment方法的具体用法?Java JdkConstants.HorizontalAlignment怎么用?Java JdkConstants.HorizontalAlignment使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.intellij.lang.annotations.JdkConstants
的用法示例。
在下文中一共展示了JdkConstants.HorizontalAlignment方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createAdComponent
import org.intellij.lang.annotations.JdkConstants; //导入方法依赖的package包/类
public static JLabel createAdComponent(final String bottomText, final Border border, @JdkConstants.HorizontalAlignment int alignment) {
JLabel label = new JLabel();
label.setText(bottomText);
label.setHorizontalAlignment(alignment);
label.setFont(label.getFont().deriveFont((float)(label.getFont().getSize() - 2)));
if (bottomText != null) {
label.setBorder(border);
}
return label;
}
示例2: setTextAlign
import org.intellij.lang.annotations.JdkConstants; //导入方法依赖的package包/类
public void setTextAlign(@JdkConstants.HorizontalAlignment int align) {
myTextAlign = align;
}
示例3: JBLabel
import org.intellij.lang.annotations.JdkConstants; //导入方法依赖的package包/类
public JBLabel(@NotNull String text, @JdkConstants.HorizontalAlignment int horizontalAlignment) {
super(text, horizontalAlignment);
}
示例4: JBLabelDecorator
import org.intellij.lang.annotations.JdkConstants; //导入方法依赖的package包/类
private JBLabelDecorator(@NotNull String text, @JdkConstants.HorizontalAlignment int horizontalAlignment) {
super(text, horizontalAlignment);
}
示例5: BoldLabel
import org.intellij.lang.annotations.JdkConstants; //导入方法依赖的package包/类
public BoldLabel(String text, @JdkConstants.HorizontalAlignment int horizontalAlignment) {
super(toHtml(text), horizontalAlignment);
}
示例6: StrikeoutLabel
import org.intellij.lang.annotations.JdkConstants; //导入方法依赖的package包/类
public StrikeoutLabel(String text, @JdkConstants.HorizontalAlignment int horizontalAlignment) {
super(text, horizontalAlignment);
}
示例7: append
import org.intellij.lang.annotations.JdkConstants; //导入方法依赖的package包/类
/**
* Appends text fragment and sets it's end offset and alignment.
* See SimpleColoredComponent#appendTextPadding for details
* @param fragment text fragment
* @param attributes text attributes
* @param padding end offset of the text
* @param align alignment between current offset and padding
*/
public final void append(@NotNull final String fragment, @NotNull final SimpleTextAttributes attributes, int padding, @JdkConstants.HorizontalAlignment int align) {
append(fragment, attributes, myMainTextLastIndex < 0);
appendTextPadding(padding, align);
}
示例8: appendTextPadding
import org.intellij.lang.annotations.JdkConstants; //导入方法依赖的package包/类
/**
* @param padding end offset that will be set after drawing current text fragment
* @param align alignment of the current text fragment, if it is SwingConstants.RIGHT
* or SwingConstants.TRAILING then the text fragment will be aligned to the right at
* the padding, otherwise it will be aligned to the left
*/
public synchronized void appendTextPadding(int padding, @JdkConstants.HorizontalAlignment int align) {
final int alignIndex = myFragments.size() - 1;
myFragmentPadding.put(alignIndex, padding);
myFragmentAlignment.put(alignIndex, align);
}
示例9: setAdText
import org.intellij.lang.annotations.JdkConstants; //导入方法依赖的package包/类
void setAdText(String s, @JdkConstants.HorizontalAlignment int alignment);