forked from fanruan/design
kerry
8 years ago
2 changed files with 45 additions and 1 deletions
@ -0,0 +1,44 @@
|
||||
package com.fr.design.hyperlink; |
||||
|
||||
/** |
||||
* Created by ibm on 2016/10/13. |
||||
*/ |
||||
public enum HyperlinkTargetFrame { |
||||
BLANK_FRAME("_blank", 0), DIALOG_FRAME("_dialog", 1), SELF_FRAME("_self", 2); |
||||
|
||||
private String name; |
||||
private int index; |
||||
|
||||
|
||||
HyperlinkTargetFrame(String name, int index) { |
||||
this.name = name; |
||||
this.index = index; |
||||
} |
||||
|
||||
public static String getName(int index) { |
||||
for (HyperlinkTargetFrame hyperlinkTargetFrame : HyperlinkTargetFrame.values()) { |
||||
if (hyperlinkTargetFrame.getIndex() == index) { |
||||
return hyperlinkTargetFrame.name; |
||||
} |
||||
} |
||||
return null; |
||||
} |
||||
|
||||
public int getIndex() { |
||||
return index; |
||||
} |
||||
|
||||
public void setIndex(int index) { |
||||
this.index = index; |
||||
} |
||||
|
||||
public String getName() { |
||||
return name; |
||||
|
||||
} |
||||
|
||||
public void setName(String name) { |
||||
this.name = name; |
||||
} |
||||
} |
||||
|
Loading…
Reference in new issue