/** * This method set the focus on a specific component. * * <p>expressionInfo[0] can be something like: COMPONENT_CATEGORY_EXPRESSION, * COMPONENT_SERIES_EXPRESSION, COMPONENT_VALUE_EXPRESSION... * * <p>If it is COMPONENT_HYPERLINK, other parameters are expected... otherInfo is used here only * for COMPONENT_HYPERLINK otherInfo[0] = expression ID otherInfo[1] = parameter # otherInfo[2] = * parameter expression ID */ public void setFocusedExpression(Object[] expressionInfo) { if (expressionInfo == null) return; int expID = ((Integer) expressionInfo[0]).intValue(); switch (expID) { case COMPONENT_CATEGORY_EXPRESSION: Misc.selectTextAndFocusArea(jRTextExpressionCategory); break; case COMPONENT_SERIES_EXPRESSION: Misc.selectTextAndFocusArea(jRTextExpressionSeries); break; case COMPONENT_VALUE_EXPRESSION: Misc.selectTextAndFocusArea(jRTextExpressionValue); break; case COMPONENT_LABEL_EXPRESSION: Misc.selectTextAndFocusArea(jRTextExpressionLabel); break; case COMPONENT_HYPERLINK: jTabbedPane1.setSelectedComponent(sectionItemHyperlinkPanel1); Object newInfo[] = new Object[expressionInfo.length - 1]; for (int i = 1; i < expressionInfo.length; ++i) newInfo[i - 1] = expressionInfo[i]; sectionItemHyperlinkPanel1.setFocusedExpression(newInfo); break; } }
public void containerWindowOpened() { sectionItemHyperlinkPanel1.openExtraWindows(); }