本文整理了Java中javax.swing.JTextArea.getParent()
方法的一些代码示例,展示了JTextArea.getParent()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTextArea.getParent()
方法的具体详情如下:
包路径:javax.swing.JTextArea
类名称:JTextArea
方法名:getParent
暂无
代码示例来源:origin: org.tinyjee.jgraphx/jgraphx
/**
* Returns the current editor or null if no editing is in progress.
*/
public Component getEditor()
{
if (textArea.getParent() != null)
{
return textArea;
}
else if (editingCell != null)
{
return editorPane;
}
return null;
}
代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx
/**
* Returns the current editor or null if no editing is in progress.
*/
public Component getEditor()
{
if (textArea.getParent() != null)
{
return textArea;
}
else if (editingCell != null)
{
return editorPane;
}
return null;
}
代码示例来源:origin: mucommander/mucommander
/**
* Mouse events bubble up until finding a component with a relative listener.
* That's why in case we get an event that needs to initiate its default behavior,
* we just bubble it up to the parent component of the JTextArea.
*/
public void mouseWheelMoved(MouseWheelEvent e) {
boolean isCtrlPressed = (e.getModifiers() & KeyEvent.CTRL_MASK)!=0;
if (isCtrlPressed) {
Font currentFont = textArea.getFont();
int currentFontSize = currentFont.getSize();
boolean rotationUp = e.getWheelRotation() < 0;
if ((!rotationUp && currentFontSize > 1) || rotationUp) {
Font newFont = new Font(currentFont.getName(), currentFont.getStyle(), currentFontSize + (rotationUp ? 1 : -1));
textArea.setFont(newFont);
}
}
else {
textArea.getParent().dispatchEvent(e);
}
}
});
代码示例来源:origin: stackoverflow.com
);
txtAreaLeft.setBackground(txtAreaLeft.getParent().getBackground());
txtAreaRight.setBackground(txtAreaRight.getParent().getBackground());
txtAreaBottom.setBackground(txtAreaBottom.getParent().getBackground());
frameMain.setContentPane(pnlMain);
frameMain.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
代码示例来源:origin: org.tinyjee.jgraphx/jgraphx
/**
* Returns the current editing value.
*/
public String getCurrentValue()
{
String result;
if (textArea.getParent() != null)
{
result = textArea.getText();
}
else
{
result = editorPane.getText();
if (isExtractHtmlBody())
{
result = mxUtils
.getBodyMarkup(result, isReplaceHtmlLinefeeds());
}
}
return result;
}
代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx
/**
* Returns the current editing value.
*/
public String getCurrentValue()
{
String result;
if (textArea.getParent() != null)
{
result = textArea.getText();
}
else
{
result = editorPane.getText();
if (isExtractHtmlBody())
{
result = mxUtils
.getBodyMarkup(result, isReplaceHtmlLinefeeds());
}
}
return result;
}
代码示例来源:origin: stackoverflow.com
public void mouseClicked(MouseEvent e) {
if (renderer.getParent() == null) {
代码示例来源:origin: stackoverflow.com
final JScrollPane scrollPane = (JScrollPane) (textArea.getParent().getParent());
内容来源于网络,如有侵权,请联系作者删除!